MATLAB 中的fft 后为何要用fftshift
分类: Matlab 2011-08-15 10:52 581 人阅读 评论(0) 收藏 举报 fft 是一维傅里叶变换,即将时域信号转换为频域信号 fftshift 是针对频域的,将 FFT 的DC 分量移到频谱中心 即对频域的图像,(假设用一条水平线和一条垂直线将频谱图分成四块)对这四块进行对角线的交换与反对角线的交换 FFTSHIFT Shift zero-frequency component to center of spectrum
For vectors, FFTSHIFT(X) swaps(交换) the left and right halves of X
For matrices, FFTSHIFT(X) swaps the first and third quadrants and the second and fourth quadrants
For N-D arrays, FFTSHIFT(X) swaps "half-spaces" of X along each dimension
FFTSHIFT(X,DIM) applies the FFTSHIFT operation along the dimension DIM
FFTSHIFT is useful for visualizing the Fourier transform with the zero-frequency component in the middle of the spectrum
fftshift 就是对换数据的左右两边比如 x=[1 2 3 4] fftshift(x) ->[3 4 1 2] IFFTSHIFT Inverse FFT shift
(就是fftshift 的逆) x=[1 2 3