Hi all
I'm doing EEG signals analyzing for my project. I've filtered my signal by a bandpass filter(1-40 Hz) and after that, I want to compute PSD using Pwelch method.
My question is about sampling frequency value in Pwelch (fs).
[pxx,f] = pwelch(x,window,noverlap,f,fs)
my signals sampling frequency is 500 Hz but when I use fs=500 the f in [Pxx f] will be between (0-250) and the Pxx values are correspond to this frequency range(0-250) whereas In the previous step I've filtered my signal (1-40Hz). (Files are attached).
If I consider the f values and use pxx values correspond to f, I should use just 165 sample of pxx file from 1025 sample because 165th sample is equal to 40.0391 Hz and I need just PSD between 1 to 40 Hz.
I'm a bit confused about selecting the value of fs. it should be my sampling frequency or I should select it based on my signal frequency range after filtering. for instance here my maximum frequency is 40 should I select fs 80?
Best Regards,
Hamed