[FieldTrip] selecting which dimension to average over in ft_singleplotER

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Tue Nov 12 10:53:17 CET 2013

```Hi Matt,

In general, when dealing with time-frequency data, it is advisable to use ft_singleplotTFR, rather than ft_singleplotER. This will show the data both as a function of time and frequency. Interesting that ft_singleplotER works in the first place. If you want to visualize coherence as a function of frequency (i.e. collapsing across time) you can easily do this 'by hand':

C = mean(fd.cohspctrm,3);
figure;plot(fd.freq, C);

Alternatively, you could use 'mtmfft' as a method for your spectral estimation, which yields frequency domain info without a time dimension.
Once you have this, you can use ft_singleplotER (now it is ER confusingly) to visualize the data.

Best,
Jan-Mathijs

On Nov 7, 2013, at 8:38 PM, mattmizumi at gmail.com wrote:

> A simple newbie question about ft_singleplotER: given a coherence spectrum, as follows,
>
> fd =
>
>     labelcmb: {'vStr1'  'vStr2'}
>       dimord: 'chan_freq_time'
>    cohspctrm: [1x100x101 double]
>         freq: [1x100 double]
>         time: [1x101 double]
>          dof: [1x100 double]
>          cfg: [1x1 struct]
>
> how can I plot frequency against coherence? The default behavior of ft_singleplotER in this case is to average over frequency:
>
> cfg = [];
> cfg.parameter        = 'cohspctrm';
> cfg.refchannel       = 'vStr2';
> cfg.channel          = 'vStr1';
> ft_singleplotER(cfg, fd);
>
> selected 1 channels for cohspctrm
> selection cohspctrm along dimension 2
> averaging cohspctrm over freq
> the call to "ft_singleplotER" took 0 seconds
>
> ..but I cannot find a way to get it to average over time instead. How can I do this?
>
> (Of course, I know I can plot this manually. But I would like to understand how to use the ft plotting functions. I can't find anything pertinent in the coherence and plotting tutorials, or the help for ft_singleplotER.)
>
> Thanks!
>
> -- Matt
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Jan-Mathijs Schoffelen, MD PhD

Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,

Max Planck Institute for Psycholinguistics,
Nijmegen, The Netherlands

J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793

http://www.hettaligebrein.nl

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