# frequency resolution of the power spectrum

Thomas Dijkman t.b.dijkman at STUDENT.UTWENTE.NL
Thu Jul 2 15:53:44 CEST 2009

```Hi Martin,

The frequency resolution is determined by the length of your trial -> 5 minutes = 300 seconds -> 1/300 = 0.0033 Hz. You have to divide your single trial into smaller fragments and then average the resulting spectra (I believe you can do this directly in Fieldtrip). You could for example use Welch's method.

Regards,

Thomas

-----Oorspronkelijk bericht-----
Van: FieldTrip discussion list namens Martin Bleichner
Verzonden: do 2-7-2009 15:39
Aan: FIELDTRIP at NIC.SURFNET.NL
Onderwerp: [FIELDTRIP] frequency resolution of the power spectrum

Hi there,

this might be a stupid question. I probably miss something obvious.

I want to compute the power spectrum over a single trial (around 5 minutes).

using this piece of code
cfg        = [];
cfg.method = 'mtmfft';
cfg.output = 'pow';
cfg.foilim = [1 100];
cfg.taper  = 'hanning';
freq       = freqanalysis(cfg, data);

as a result I get
freq: [1x62534 double]
powspctrm: [96x62534 double]

that is a frequency resolution of 0.0032Hz!? What determines the frequency
resolution here? What can I do to make it less fine grained?

Thanks
Martin

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.

```