Matlab、FFT 和质心频率
我以这种给定的方式在 Matlab 中进行了 FFT。
X=fft(t); % Take Fourier Transform
T=abs(X); % Take real parts of transform
T=T(1:n/2);
我有兴趣找到该图的质心频率。据我所知,质心频率的给出如下:
其中 x(n) 表示加权频率值,或bin 号 n 的幅度,f(n) 表示该 bin 的中心频率。
现在我很想说 f(n) 是脚本中 T 的值,但这些是 FFT 的虚部和实部的绝对值,所以我不知道如何找到 x(n)这应该是一个加权频率。
I have taken the FFT in Matlab in this given way.
X=fft(t); % Take Fourier Transform
T=abs(X); % Take real parts of transform
T=T(1:n/2);
I'm interested in finding the centroid frequency of this plot. I understand that the centroid freuency is given as:
Where x(n) represents the weighted frequency value, or magnitude, of bin number n, and f(n) represents the center frequency of that bin.
Now I am tempted to say that f(n) are the values from T in my script, but those are the absolute values of the imaginary and real components of the FFT and so I don't know how to find the x(n) which is supposed to be a weighted frequency.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你说
f(n)
是第n个bin的中心频率;这与您的数据无关。它只是采样频率的函数:当然,您可以在上面的等式中将其分解:
听起来
x
就是您在代码中所说的T
。You say that
f(n)
is the centre-frequency of the n-th bin; this is nothing to do with your data. It's simply a function of your sampling frequency:You can of course, factor this out in your above equation:
It sounds like
x
is what you've calledT
in your code.