### Trouble using mem() function in MATLAB

Posted:

**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:

As usual thanks for your help.

Alessandro

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;
```

Alessandro