[FieldTrip] Issues with TF analysis and plotting

Poppy Watson popwatson at hotmail.com
Fri Aug 3 07:23:00 CEST 2018


Dear all,
Sorry for this simple question but I am unable to work out what I am doing wrong.

I am working through a TF analysis using all the online tutorials etc. I'm interested in the time window 1 second before the trigger but have taken a 2 second window (0.5 seconds either side of the bit I am interested in). Everything seems to be going ok and the freq.powspctrm object seems to be the correct size but when plotting my results (using any of the multiplot, singeplot or topoplot methods) I keep getting the error message: incorrect specification of cfg.trials for data without repetitions.
See here some example code:

  cfg.trials  = highValSuccessTrials; % this is a vector of trial numbers
  cfg.method = 'mtmconvol';
  cfg.keeptrials = 'no';
  cfg.output = 'pow';
  cfg.channel = 'eeg';
  cfg.taper = 'hanning';
  cfg.foi   = 2:2:30;
  cfg.t_ftimwin    = ones(length(cfg.foi),1).*2;   % length of time window = 2 sec
  cfg.toi          = -1.5:0.05:0.5;                  % time window "slides" from -1.5 to 0.5 sec (0.5 s after stim presentation) in steps of 0.05 sec (50 ms)
  freqdata = ft_freqanalysis(cfg, preProcData);

%%plotting
cfg.baseline     = [-1.5 -1.1]; % this is just before my 1 sec of interest
cfg.baselinetype = 'absolute';
cfg.maskstyle    = 'saturation';
cfg.channel      = 'FcZ';
figure
ft_singleplotTFR(cfg, freqdata);

Much appreciated!
---------------------------------------------------------------------
P. Watson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180803/16c2094b/attachment.html>


More information about the fieldtrip mailing list