Page 1 of 1

Trouble using mem() function in MATLAB

Posted: 13 Jun 2011, 16:55
by dyd1985
Hi,
I'm trying to use the mem() function in MATLAB with EEG signals imported using load_bcidat('..','-calibrated'), but the plots I get are very weird, the spectral power decreases exponentially. So in order to test the MEM function I'm trying to use some sinusoidal inputs plus white noise (because I read that MEM doesn't behave well with pure sines). Again the plots I'm getting don't make any sense... this time the spectral power increases exponentially. If I use the pwelch() I get the right spectra for my sines instead.

The parameters I'm passing the mem function are:

Code: Select all

sampfreq = 512;
ModelOrder= 16;
FirstBinCenter= 0;
LastBinCenter= 30/(sampfreq);
BinWidth= 1/(sampfreq);
EvaluationsPerBin= 15;
settingtrend = 1;
As usual thanks for your help.

Alessandro

Re: Trouble using mem() function in MATLAB

Posted: 13 Jun 2011, 20:37
by gschalk
Allesandro,

I would have to check the documentation again, but I think

LastBinCenter should be 30, and not 30/(sampfreq);

Same for BinWidth.

Gerv

Re: Trouble using mem() function in MATLAB

Posted: 14 Jun 2011, 11:01
by dyd1985
Hey Gerv,

as always thank you so much. I tested and you were right, LastBinCenter and BinWidth must be specified in Hz and not as normalized frequency.

Thanks,
Alessandro