[FieldTrip] ft_freqgrandaverage

Jung, Patrick patrick.jung at esi-frankfurt.de
Fri Feb 8 12:06:07 CET 2013

```Hi Fieldtrippers,

To get a feeling of my data I want to visually inspect the data and look where are differences between the conditions
by plotting the grand-averages of TFRs.
By using ft_freqgrandaverage I noticed that it gives back NaN
if freq entries for one time bin are missing for one subject (n=28).
[cid:image003.jpg at 01CE05F4.DAF32510]

1.       sSTOP,                                                  2. cAC,                                                 3. diff

In my data with variable trial lengths, the shortest poststim time point is around 0.06 s in one condition (cAC) and in one subject
but I expect my effects around 0.1-0.35 s.
How can I overcome this problem? Is there a more appropriate fieldtrip function or do I have to write a special self-made Matlab code?

Here is an excerpt of my code:
GA_sSTOP = ft_freqgrandaverage(cfg, AllSubjMat_sSTOP{1,:});
% where AllSubjMat_sSTOP contains TFRs of all subjects in a <1x28 cell>
GA_cAC = ft_freqgrandaverage(cfg, AllSubjMat_cAC{1,:});
GA_diff.powspctrm = (GA_sSTOP.powspctrm - GA_cAC.powspctrm) ./ (0.5*GA_sSTOP.powspctrm + 0.5*GA_cAC.powspctrm);

Many thanks for your help!

Cheers,
Patrick

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130208/bbdca6fe/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 11890 bytes
Desc: image003.jpg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130208/bbdca6fe/attachment-0001.jpg>
```