[FieldTrip] Error in prepare_freq_matrices.m ?

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Mon Feb 4 12:01:11 CET 2013

Hi Andrea,

This could very well be. Sorry for not getting back to you earlier. Could you create an account on our bugzilla server and file this as a bug? We will then look into it (and fix it) as soon as possible. 
For the time being, could you work around it by just changing your code locally?

Thanks and best wishes,


On Feb 4, 2013, at 9:22 AM, andrea brovelli wrote:

> Dear all,
> I have an error while running ft_sourceanalysis. I am analysing a data set over a frequency range which includes 100 frequencies and 60 trials. I get an error due to the definition of the variable Ntrials, which as far as I understand, it is done in prepare_freq_matrices.m at lines 76 -> 85:
> -------------------------------------------------
> % the time-frequency latency has already been squeezed away (see above)
> if strcmp(freq.dimord, 'chan_freq')
>  Ntrials = 1;
> elseif strcmp(freq.dimord, 'rpt_chan_freq')
>  Ntrials = length(freq.cumtapcnt);
> elseif strcmp(freq.dimord, 'rpttap_chan_freq')
>  Ntrials = length(freq.cumtapcnt);
> else
>  error('unrecognized dimord for frequency data');
> end
> -------------------------------------------------
> If the number of trials is less than the number of frequencies, Ntrials = length(freq.cumtapcnt) should be replaced by Ntrials = size(freq.cumtapcnt,1);
> It is the case ?
> Thanks a lot
> Andrea
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Jan-Mathijs Schoffelen, MD PhD 

Donders Institute for Brain, Cognition and Behaviour, 
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands

Max Planck Institute for Psycholinguistics,
Nijmegen, The Netherlands

J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793

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

More information about the fieldtrip mailing list