[FieldTrip] power-frequency figure
Jinyi Long
longjinyi at gmail.com
Fri Nov 7 14:24:18 CET 2014
Dear Tzvetan, Thanks for your help. First, to plot the spectral power for
one channel with the 'ft_singleplotER', how can I calculate the power
spectrum with 'ft_freqanalsis'? Can I use the following code to calculate
and plot power spectrum? Thanks a lot!
Best,
Jinyi
%% frequency analysis
cfg = [];
cfg.output = 'pow';%'fourier';%
% cfg.channel = 'MEG';
cfg.method = 'mtmconvol';
cfg.taper = 'hanning';
cfg.foi = 2:1:40; % analysis 2 to 30 Hz in
steps of 2 Hz
cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window
= 0.5 sec
cfg.toi = -0.5:0.05:4; % time window "slides"
from -0.5 to 1.5 sec in steps of 0.05 sec (50 ms)
TFRhann = ft_freqanalysis(cfg, data);
%% visualize
cfg = [];
cfg.baseline = [-0.9 -0.1];
cfg.baselinetype = 'absolute';
cfg.maskstyle = 'saturation';
cfg.zlim = [-3e-7 3e-7]; %
cfg.channel = '26';
figure
ft_singleplotER(cfg, TFRhann)
2014-11-07 1:33 GMT-05:00 Tzvetan Popov <tzvetan.popov at uni-konstanz.de>:
> Dear Jinyi,
> You can use ft_singleplotER to plot the power spectrum of a single
> channel. If you are interested in the same but for multiple channels than
> use ft_multiplotER. Finally if you are interested in the topography of a
> particular frequency you'd specify it in cfg.xlim=[begin end] and call
> ft_topoplotER.
> Good luck
> Tzvetan
>
>
>
> > Am 07.11.2014 um 00:23 schrieb Jinyi Long <longjinyi at gmail.com>:
> >
> > Dear Sir/Madam, Thanks for your powerful tool. Now I have one question.
> When I perform the frequency analysis with the function of
> 'ft_freqanalaysis', how can I plot the power-frequency figure but not 2D
> time-frequency figure at single channel? Thanks!
> >
> > Best,
> > Jinyi
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141107/75bfc447/attachment-0002.html>
More information about the fieldtrip
mailing list