How to use STFT for extract different frequency bands from the signal. For example, we have an EEG signal with sample frequency FS=100 or 256. How to get subbands such as delta(0.1-4Hz) theta (4-8Hz.), alpha(8-12Hz), beta(12-30Hz) and gamma(>30Hz).
I am sorry, I don't know if I correctly understood your question. Are you having trouble to perform the STFT in a specific software, or the problem is interpreting the output of an STFT algorithm in order to get the specific frequency bands?
My problem is interpreting the output of an STFT algorithm in order to get the specific frequency bands
For extracting specific frequency bands from a signal (EX: EEG) we have some methods such as FFT, STFT and WT. I did in FFT on MATLAB. I try to do the same thing in STFT ( short-time Fourier transform ) .
With the help of “spectrogram” from https://in.mathworks.com/help/signal/ref/spectrogram.html I try to break a signal into a number of different frequency bands.
wlen = 512; % window length (recomended to be power of 2)
hop = wlen/4; % hop size (recomended to be power of 2)
nfft = 4*wlen; % number of fft points (recomended to be power of 2)
w1 = hanning(wlen, 'periodic'); % window
fs % sample frequency
output parameters:
ffS--->frequency
tS---> time
Samp ----> contains an estimate of the short-term, time-localized frequency content of x.
Here ffS and tS are single dimensional array values.
Samp is multidimensional array (TWO dimensional).
How we know “samp” contains specific frequency bands.
Simple, help me for the following question
How to extract specific frequency bands (in a range of 0.1-4Hz, 4-8Hz. 8-12Hz, 12-30Hz and 30-50Hz.) from a signal using STFT ( short-time Fourier transform ) concept.
I see. I believe I understand it a little better know, thank you!
So, in your output parameters, you should have an entire range of frequencies up to half the sampling frequency value. If you want to identify specific frequency bands, you could look for the elements in these vectors (in ffS, for instance) containing the desired range (for example, 4 to 8 Hz for the theta band). Identifying which these vector elements are should give you the conditions to find the corresponding power spectral values in the Samp array.
I hope that I really got what you meant this time.