[Eeglablist] Error with spectopo

James Bonello jamesbonello9 at gmail.com
Sun Nov 30 13:19:04 PST 2014

Hi EEGLablist,

I am trying to calculate the PSD value for a range of frequencies, for 23
channels. I do this for 1799 epochs, for 42 hours. I will then repeat this
for 24 patients. I am using CHB-MIT EEG data.

I implemented a for loop which calls the spectopo function and stores the
required values in a 23 x 1799 x 42. Indeed, the for loop, loops over the
number of hours and for each hour it loops over the number of epochs and
then for each channel, the spectopo function is called and the values are
stored accordingly.

Spectopo gets the required psd values well even though this is taking hours
to calculate (have not considered parallelisation yet), but during the 25th
hour this error that I don't know how to fix pops up:

Improper assignment with rectangular empty matrix.

Error in spectopo (line 471)
reallimits(1) = min(min(eegspecdB(:,minfreqidx:maxfreqidx)));

I tried to see if there was anything wrong with the data for the 25th hour
but everything seems fine. Taking a look at line 471, I couldn't find
anything out of the ordinary but then again I found it hard to understand
what exactly is happening during this line. Moreover, the "Improper
assignment" error does not make sense, I was not trying to assign an empty
matrix anywhere in my code. In fact the 23x1799x42 matrix assignment
happens outside of the code. Can anyone please shed any insight on this
matter? I will greatly appreciate any help given!

Thank you.


*James Bonello*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20141130/e6ad9a34/attachment.html>

More information about the eeglablist mailing list