Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freqs output from Spectopo.m #101

Closed
CorentinWicht opened this issue Dec 11, 2019 · 1 comment
Closed

freqs output from Spectopo.m #101

CorentinWicht opened this issue Dec 11, 2019 · 1 comment

Comments

@CorentinWicht
Copy link

Dear EEGLab developpers,

I am having a hard time figuring it out why the freqs output from Spectopo.m always starts at 0.

From my understanding, this is because Spectopo.m computes the PSD (i.e. which is a density under the curve), which would mean that when freqs = 0Hz it is in fact the PSD from 0 to 0.9999 Hz ?

Am i correct?

I want to extract frequency ranges from the spectra output (e.g. 2-4Hz) and average them.
Then if I am correct, this means that I will have to do mean(spectra(:,3-4),2) since:

  • freqs(3) is 2-2.999Hz
  • freqs(4) is 3-3.999Hz

Using the function:
[spectra ,freqs]=spectopo(EEG, 1, EEG.srate,'freqfac',1)

Many thanks and best regards,

Corentin Wicht

@arnodelorme
Copy link
Collaborator

Dear Corentin,

Frequency 0 is the DC offset in the FFT. Both the pwelch and psd (psd now deprecated) Matlab functions return it as well.

Arno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants