PSD, frequency bands

Hi,
I am trying to run PSD using default frequency band option (starting from delta 2-4 to gamma 60-90) and getting the following plot:

What is the issue here, the EEG data is band pass filtered at 30-100 Hz but I get values bellow 30 Hz and above 100 Hz.

When I try frequency bands option, I get this plot:

It is the same EEG data as above, it starts from 10 Hz but data is cut at 75 Hz, although data is band pass filtered at 30-100Hz. When I put specific frequency band window, it gives error message.

Thanks

What does you initial PSD look like? (compute something with an estimator window that is long enough to have a frequency resolution < 1Hz)

The "frequency bands" on the PSD does the following: first it compute the PSD over the entire frequency spectrum as defined by Matlab's FFT function, then it averages the bins contained in each of the frequency bands you requested.
It does this both when using the option "frequency bands" from the PSD process directly, or when using the process "Frequency > Group in time or frequency bands".

In the spectrum figures, the PSD averaged by frequency bands are represented by one value at the middle of the frequency band, for the band 60-90 you get the averaged value displayed at 75Hz.

It is the same EEG data as above, it starts from 10 Hz but data is cut at 75 Hz, although data is band pass filtered at 30-100Hz. When I put specific frequency band window, it gives error message.

Thanks Francois, so I should refer to the formula t = 1/f to define Hamming time window for a given frequency band!?

What are you referring to?

I mean Hamming time window = 1/ frequency?

For the calculation of the PSD?
No, it is a fixed-length window for all the frequencies.
You can check out the details of the implementation directly in the code:

OK, thank you.

Hello!
Would there be a way to change the window length so to optimize it in each of the frequency bands?
Thanks!

No, this is not possible with this PSD function.
You can try with the Morlet wavelets, or the FieldTrip multitaper instead.

Thank you François!