How do i get all the numbers of fft bins in a defined frequency band?

463 views Asked by At

I use the matlab software. To my question. I have a audio signal, on which i am applying a STFT. I take a segment (46 ms, specifially chosen) out of my signal y(audio signal) and use a FFT on it. Then i go to the next segment, until to end of my audio signal.

My WAV-File is 10.8526 seconds long. If I have a sample frequency of 44100Hz, this means my y is 10.8526*fs = 478599.66 which is shown in the workspace as 478 6000 x2 double.

The length of my fft is 2048. My signal are differentiated under lower frequency band [0 300], mfb [301 5000] and hfb [5001 22050(fs/2)].

The bands are just an example and not the actual matlab code. Basicall what i want (or what I am trying to do), is to get the values of my bins in the defined frequency band and do a arithmetic mean on it.

I chose 46 ms because, I want it as long as the fft length, or nearly as long as the fft. (It is not exact).Afterwards, I want to try plotting it, but that is not important right now. Any help is appreciated.

1

There are 1 answers

2
Noel Segura Meraz On

Fourier transform of a signal in time domain in a vector of size n will return another vector of size n of same signal but in frequency domain.

Frequency domain will be from 0 (dc offset) to your sampling frequency. But you will only be able to use half of that. Second half would have same values but mirrored.

You can obtain the center frequency of each useful bin with:

f = Fs*(0:(n/2))/n;