Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Tue Jan 8 09:00:48 CET 2019

Hi Elena,

Just like almost all high level fieldtrip functions, ft_freqanalysis requires both a ‘cfg’ variable, and a ‘data’ variable in its input. In your code you only use cfg.

Best wishes,

J.M.Schoffelen, MD PhD
Senior Researcher, VIDI-fellow - PI, language in interaction
Telephone: +31-24-3614793
Physical location: room 00.028
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands

On 7 Jan 2019, at 18:21, Elene Beitia Loinaz <elene.beitia at alumni.mondragon.edu<mailto:elene.beitia at alumni.mondragon.edu>> wrote:

Dear Fieldtrip Community,

My name is Elene Beitia, I am a student from the Basque Country. I am trying to use the fieltrip toolbox to do a source reconstruction of EEG`s in Resting State.

I am  having troubles in doing the fourier transform. The input data that I am using is in 'ms' and the error that I get is the next one:

Error using ft_checkdata (line 525)
This function requires 'raw', 'raw+comp' or 'mvar' data as input, see ft_datatype_raw or ft_datatype_mvar.

Error in ft_freqanalysis (line 212)
data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes');

I have change the parameters to see if the problem was there but I still get the same.

I add the code in this message:



cfg              = [];
cfg.dataset      = filename;
cfg.datatype     ='mvar';
cfg.continuous   ='yes';
cfg.output       = 'fourier';
cfg.channelcmb   = 'all';
cfg.channel      = 'all';
cfg.trials       = 'all';
cfg.keeptrials   = 'yes';
cfg.keeptapers   = 'yes';
cfg.method       = 'mtmfft';
cfg.taper        = 'hanning';
cfg.toi          = [-1 : 0.10 : 1.5];
cfg.foi          = 1:40;
cfg.t_ftimwin    = ones(size(cfg.foi)) * 0.5;
cfg.pad          ='nextpow2';
cfg.feedback     = 'no';
%cfg.hassampleinfo= 'yes';

data_Fourier     = ft_freqanalysis(cfg);


Hope you can give me some information in order to solve the problem,

Thank you in advanced,


fieldtrip mailing list

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

More information about the fieldtrip mailing list