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

和自甴很熟 提交于 2019-12-11 02:39:44

问题


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:


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;


来源:https://stackoverflow.com/questions/41240420/how-do-i-get-all-the-numbers-of-fft-bins-in-a-defined-frequency-band

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!