[FieldTrip] Question regarding the function ft_freqstatistics.

Chauviere, Laetitia laetitia.chauviere at brain.mpg.de
Thu Oct 21 09:30:21 CEST 2021


Dear FieldTrip users,

I have a question regarding the function ft_freqstatistics.

I would like to do statistics on the powerspectrum data (output of the function ft_freqanalysis) between two conditions (same monkey).

I have the Data Input whose structure corresponds to the output of the function ft_freqanalysis, and the design matrix whose size is the same as the data input (datainput.powspctrm) : size(datainput.powspctrm) = size(cfg.design), and the data to compare are in datainput.powspctrm.

BigMat = NaN(8670,1,182,164);
BigMat (1:2078,1,1:91,1:77) = MM25;             % matrix (trials, channel, freq, time) - 1st condition
BigMat (2079:8670,1,92:182,78:164) = M25;   % matrix (trials, channel, freq, time) - 2nd condition

BigMatdef = PowAllCond_ALLFBS{1,1};     % PowAllCond_ALLFBS{1,1} : output function ft_freqanalysis, so to get the same structure
BigMatdef.powspctrm = BigMat;                      % big matrix (trials, channel,freq,time) - with the two conditions

cfg.design(1:2078,:,:,:) = 1;         % 1st condition
cfg.design(2079:8670,:,:,:) = 2;   % 2nd condition

However I still have this error message from Matlab:
"Error using ft_freqstatistics (line 294)
the number of observations in the design does not match the number of observations in the data"

Any tip/suggestion?

Many thanks in advance!

Best,
Laetitia.

Dr. Laetitia Chauvière - PhD
Post-Doc - Prof. Singer's lab - Room 303
Max Planck Institute for Brain Research
Deutschordenstr. 46
60528 Frankfurt am Main - Germany
laetitia.chauviere at brain.mpg.de
T: +49 69 96769-272

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20211021/31b6a8f0/attachment.htm>


More information about the fieldtrip mailing list