[FieldTrip] ft_resampledata error 'Matrix dimensions must agree'

shiri makov mkshiri at gmail.com
Thu May 12 11:02:28 CEST 2016


Dear community,

My name is Shiri and I am a student at Tel-Aviv Univesrity. I study
perception during sleep using EEG. Currently I am analysing EEG data
collected with EGI system.

I tried using ft_resampledata to detrend the data. The weird thing is
that *sometimes
*when I call ft_resampledata, I get an error message:

the input is raw data with 8 channels and 60 trials
resampling data
Octave functions should not run on Matlab
Removing path ...
Error using  .*
Matrix dimensions must agree.
Error in resample (line 71)
      h = p*firls( L-1, [0 2*fc 2*fc 1], [1 1 0 0]).*kaiser(L,bta)' ;
Error in ft_resampledata (line 208)
        data.trial{itr} =
        transpose(resample(transpose(data.trial{itr}),fsres,fsorig));


As noted, this error appears only sometimes. If I run ft_resampledata again
immidiately after receiving the error, it works well (same cfg, same data).
The error always happens when I call the function within a parfor loop. It
almost never happens when I run the function line individually, without
preceeding script lines.


The cfg I use is very basic:

>> display(cfg);

cfg =

    detrend: 'yes'

It happened to me on many data structs, so I share a link with just one of
them (http://www.filedropper.com/dataexample).  Here too, I got the error
and right after that I ran the function line again and  worked well.

I don't think it's ok to live in peace with this function erroring from
time to time, can someone tell me what this error means? Did I not use the
function correctly?

Best,

Shiri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160512/a2f6900a/attachment-0002.html>


More information about the fieldtrip mailing list