Page 1 of 1

mem function

Posted: 21 Nov 2016, 20:13
by jackchen

I am currently working on the offline analysis feature (r^2) plot.

Before computing the r^2 values, there is a line calling mem() function

For example, I have a signal data with size (2501x32 double) and the
memparms is [23, 0,70,2,10,1,500,83,2.0120], after I called [trialspectrum, freq_bins] = mem( condition1data, memparms ); I observed that the trialspectrum has size of [36x32x29]. 29 is the block size, but how is it actually calculated? And how the spectrum values are calculated?

I know it is hard to access the .mexw64 file, is there a way to see what is inside the mem function? I really want to know what is going on inside it.



Re: mem function

Posted: 23 Nov 2016, 15:32
by pbrunner

the mem mex file uses the burg method to estimate the spectrum of a given signal. You can find a description of the use on the BCI2000 wiki [1], you can also explore the MATLAB implementation [2], or alternatively look into the source code of the MEM implementation in BCI2000 [3]. If you like, I can email you a mathematical description, i.e., a series of equations, that I always use in my publications to describe the function of the MEM.

[1] ... _Algorithm
[3] ... redictor.h

Regards, Peter