谁能解释一下 MATLAB 中 fft 的输出意味着什么?
>> fft([1 4 66])
ans =
71.0000 -34.0000 +53.6936i -34.0000 -53.6936i
有人可以根据上面的结果解释一下吗?
>> fft([1 4 66])
ans =
71.0000 -34.0000 +53.6936i -34.0000 -53.6936i
Can someone explain according the result above?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
编辑嗯,这很尴尬。我遗漏了一个因子 2。更新的答案如下...
离散傅立叶变换是一种 FFT 算法,可以快速计算,它假设长度
N
的输入数据是周期信号的一个周期。周期为2*pi rad
。输出点的频率由2*n*pi/N rad/sec
给出,其中n
是从0
到 <代码>N-1。对于您的示例,
71
是0 rad/sec
处的值,通常称为DC
、-34+53.7i< /code> 是
2*pi/3 rad/sec
处的值,其共轭是4*pi/3 rad/sec
处的值。请注意,按周期计算,2*pi/3 rad/sec = -2*pi/3 rad/sec = 4*pi/3 rad/sec
。因此频谱的后半部分可以被视为来自-pi..0
或pi..2*pi
的频率。如果数据表示以恒定采样率采样的数据,并且您知道该采样率,则可以将
rad/sec
转换为Hz
。令采样率为deltaT
。其倒数是采样频率Fs
。那么周期就是T = N*deltaT sec = 2*pi rad
。1/T
给出频率分辨率deltaF = Fs/N Hz
。因此,输出点的频率为n*Fs/N Hz
。EDIT Well that's embarassing. I left out a factor of 2. Updated answer follows...
The Discrete Fourier Transform, which an FFT algorithm computes quickly, assumes the input data of length
N
is one period of a periodic signal. The period is2*pi rad
. The frequency of the output points is given by2*n*pi/N rad/sec
, wheren
is the index from0
toN-1
.For your example, then,
71
is the value at0 rad/sec
, commonly calledDC
,-34+53.7i
is the value at2*pi/3 rad/sec
, and its conjugate is the value at4*pi/3 rad/sec
. Note that by periodicity,2*pi/3 rad/sec = -2*pi/3 rad/sec = 4*pi/3 rad/sec
. So the second half of the spectrum can be regarded as the frequencies from-pi..0
orpi..2*pi
.If the data represents sampled data at a constant sampling rate, and you know that sampling rate, you can convert
rad/sec
toHz
. Let the sampling rate bedeltaT
. Its reciprocal is the sampling frequencyFs
. Then the period isT = N*deltaT sec = 2*pi rad
.1/T
gives the frequency resolutiondeltaF = Fs/N Hz
. Therefore the frequency of the output points isn*Fs/N Hz
.这是表示频域信号的复数向量。
This is a vector of complex numbers representing your signal in frequency domain.