fftshift/ifftshift [英] fftshift/ifftshift
问题描述
请参阅fftshift
和ifftshift
的说明.
我想了解如何在Matlab中与fft
和fftn
关联地调用上述两个函数.
Please, see the the description of both fftshift
and ifftshift
.
I would like to understand how to call the above two functions in relationship with fft
and fftn
in Matlab.
假设我的信号具有一定的频率成分;现在,频率数组通常可以存储为:
Let say that my signal has a certain frequency content; now, the frequency array can generally be stored as:
f = (-N/2:N/2-1)*df;
f = (1:N)*(df/2);
f = [(0:N/2-1) (-N/2:-1)];
对于前面提到的3个研究案例,调用fft
以及fftshift
和ifftshift
的最佳方法是什么?
What is the best way to call fft
, coupled with fftshift
and ifftshift
, for the 3 study cases early mentioned?
调用命令序列或命令序列错误对信号的标准偏差有什么影响?
What is the effect on the standard deviation of the signal of calling the sequence of commands or the wrong one?
推荐答案
fft
的结果是(用您的符号表示)索引(0:N-1)
. fftshift
只是将其转换为[(N/2:N-1) (0:(N/2-1))]
. * ifftshift
只是恢复原始索引.
The result of fft
is (in your notation) indices (0:N-1)
. fftshift
simply converts that to [(N/2:N-1) (0:(N/2-1))]
.* ifftshift
simply restores the original indexing.
由于这只是对样本进行重新排序,因此对标准偏差没有任何作用.
As this is simply reordering samples, it does nothing to the standard deviation.
*请注意,由于周期性,样本
k
等同于样本k+N
或k-N
等.
* Note that due to periodicity, sample
k
is equivalent to sample k+N
, or k-N
, etc.
这篇关于fftshift/ifftshift的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!