[FieldTrip] Outputting band averages with ft_freqanalysis

Alea Skwara acskwara at ucdavis.edu
Wed May 2 04:05:21 CEST 2018

Hi All,

I am attempting to output averages within frequency bands using
ft_freqanalysis. I have implemented the two-step solution provided in this
resulting in the following code:

  cfg =[];
  cfg.method = 'mtmfft';
  cfg.output = 'pow';
  cfg.taper = 'hanning';
  cfg.channel = 'all';
  cfg.foilim = [fio1 foi2];
  cfg.trials = 'all';
  cfg.keeptrials = 'no';
  freq_avg = ft_freqanalysis(cfg, data_segmented);

  cfg = [];
  cfg.avgoverfreq = 'yes';
  freq_avg = ft_freqanalysis(cfg, freq_avg);

However, when I run this, I get the following error:

the input is freq data with 73 channels, 41 frequencybins and no timebins
Error using ft_checkdata>freq2raw (line 1315)
not supported for dimord chan_freq

Error in ft_checkdata (line 432)
      data = freq2raw(data);

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

Is there a different way I need to format my data beyond providing the
function with the output of the first iteration of ft_freqanalysis?

Thank you!

Alea C. Skwara, M.A.
PhD Candidate | Saron Lab

Center for Mind and Brain | University of California, Davis
267 Cousteau Place | Davis CA 95616
Cell: (828) 273-8595
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180501/a974db18/attachment-0001.html>

More information about the fieldtrip mailing list