How to find the frequency from FFT data in MATLAB

旧巷老猫 提交于 2019-12-10 23:55:55

问题


From the question: How do I obtain the frequencies of each value in an FFT?

I have a similar question. I understand the answers to the previous question, but I would like further clarification on frequency. Is frequency the same as the index?

Let's go for an example: let's assume we have an array (1X200) of data in MATLAB. When you apply 'abs(fft)' for that array it gives the same size array as the result (1X200). So, does this mean this array contains magnitude? Does this mean the indices of these magnitudes are the frequencies? Like 1, 2, 3, 4...200? Or, if this assumption is wrong, please tell me how to find the frequency from the magnitude.


回答1:


Instead of using the FFT directly you can use MATLAB's periodogram function, which takes care of a lot of the housekeeping for you, and which will plot the X (frequency axis) correctly if you supply the sample rate. See e.g. this answer.

For clarification though, the index of the FFT corresponds to frequency, and the magnitude of the complex value at each frequency (index) tells you the amplitude of the signal at that frequency.



来源:https://stackoverflow.com/questions/8824021/how-to-find-the-frequency-from-fft-data-in-matlab

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