Trouble using mem() function in MATLAB

Forum for discussion on different signal processing algorithms
Locked
dyd1985
Posts: 23
Joined: 13 May 2010, 11:19

Trouble using mem() function in MATLAB

Post by dyd1985 » 13 Jun 2011, 16:55

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

gschalk
Posts: 615
Joined: 28 Jan 2003, 12:37

Re: Trouble using mem() function in MATLAB

Post by gschalk » 13 Jun 2011, 20:37

Allesandro,

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

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

Same for BinWidth.

Gerv

dyd1985
Posts: 23
Joined: 13 May 2010, 11:19

Re: Trouble using mem() function in MATLAB

Post by dyd1985 » 14 Jun 2011, 11:01

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

Locked

Who is online

Users browsing this forum: No registered users and 0 guests