如何在MATLAB中从FFT数据中找到频率 [英] How to find the frequency from FFT data in MATLAB

查看:985
本文介绍了如何在MATLAB中从FFT数据中找到频率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从问题中发出: 如何获取每个频率是FFT中的值?

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?

让我们举个例子:假设我们在MATLAB中有一个数据数组(1X200).当您对该数组应用"abs(fft)"时,它会得到与结果相同大小的数组(1X200).那么,这是否意味着该数组包含幅度?这是否意味着这些幅度的指标就是频率?像1,2,3,4 ... 200?或者,如果这个假设是错误的,请告诉我如何从幅度中找到频率.

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.

推荐答案

您可以直接使用MATLAB的此答案.

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.

不过,为清楚起见,FFT的 index 对应于频率,并且每个频率(索引)处的复数值的 magnitude 都告诉您信号的幅度在那个频率.

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.

这篇关于如何在MATLAB中从FFT数据中找到频率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆