[FieldTrip] Problems with ft_freqanalysis

Robert Oostenveld r.oostenveld at donders.ru.nl
Thu Apr 16 12:06:42 CEST 2015


Hi Federica,

The error message you run into relates to the presence (or absence) of the Mathworks signal processing toolbox. FieldTrip relies on a number of MATLAB toolboxes (see http://www.fieldtriptoolbox.org/faq/requirements). Where possible, we try to avoid extra commercial toolboxes. Therefore we have some drop-in replacement functions in fieldtrip/external/signal (which were obtained from the Octave project). For the DPSS function (used for multitapering) however we don’t have a fully satisfactory solution.

The error message you get suggests that you are using the "fieldtrip/external/signal/dpss_hack” directory. That is one that should not be on your path, unless you explicitly add it. You should only add in case you don’t have the signal processing toolbox and know what you are doing (i.e. after having read the README in that directory).

I suspect you have used add path(genpath(…)) or the GUI equivalent of it. Please see http://www.fieldtriptoolbox.org/faq/should_i_add_fieldtrip_with_all_subdirectories_to_my_matlab_path and remove the dpss_hack directory from your path.

best
Robert

PS for the low frequency range you are interested in I suspect that multitapering won’t be the most optimal anyway. Better add cfg.taper=‘hanning’ to your analysis, and see Nietzsche explain it next Monday on https://www.youtube.com/watch?v=vwPpSglPJTE
 


On 16 Apr 2015, at 11:41, Federica Mauro <federica.ma at gmail.com> wrote:

> Hi everybody,
> 
> I'm trying to compute coherence analyses following the coherence tutorial at http://www.fieldtriptoolbox.org/tutorial/coherence.
> Since a couple of days, I have this error message in computing ft_freqanalysis:
> 
> Error using load
> Unable to read file precompute_dpss: No such file or directory.
> 
> Error in dpss (line 9)
>   load precompute_dpss
> 
> Error in ft_specest_mtmfft>double_dpss (line 335)
> tap = dpss(double(a), double(b), varargin{:});
> 
> Error in ft_specest_mtmfft (line 151)
>         tap =
>         double_dpss(ndatsample,ndatsample*(tapsmofrq./fsample))';
> 
> Error in ft_freqanalysis (line 494)
>       [spectrum,ntaper,foi] = ft_specest_mtmfft(dat, time, 'taper',
>       cfg.taper, options{:}, 'feedback', fbopt);
> 
> Is that a bug?
> 
> 
> Here is the code I'm using:
> cfg            = [];
> cfg.output     = 'powandcsd';
> cfg.method     = 'mtmfft';
> cfg.foilim     = [5 40];
> cfg.tapsmofrq  = 5;
> cfg.keeptrials = 'yes';
> 
> freq           = ft_freqanalysis(cfg, eeg);
> 
> 
> Thank you in advance,
> Federica
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150416/0027edcf/attachment-0001.html>


More information about the fieldtrip mailing list