unit of fft(DFT) x axis [duplicate]

﹥>﹥吖頭↗ 提交于 2019-12-09 00:03:19

问题


Possible Duplicate:
How to get Frequency from FFT result

I am somehow confused with the x axis of fft(DFT) command in Matlab. When we do a fft command for a signal which has sampled in n point, we get a plot in which the x axis is 0 to n-1. Does it mean frequency in Hz? For example when I have a spike on n=2 is it mean that the signal frequency is 2Hz?


回答1:


The X axis is dimensionless. To get the correspondence between bin index and frequency you need to know (a) the sample rate (in Hz), Fs, and (b) the number of points in the FFT, N. The centre frequency for the bin is then:

f = i * Fs / N

where f is the bin frequency in Hz and i is the bin index.

See this answer for a more complete explanation.



来源:https://stackoverflow.com/questions/13397393/unit-of-fftdft-x-axis

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