|MATLAB Function Reference|
Shift zero-frequency component of discrete Fourier transform to center of spectrum
Y = fftshift(X)
rearranges the outputs of
fftn by moving the zero-frequency component to the center of the array. It is useful for visualizing a Fourier transform with the zero-frequency component in the middle of the spectrum.
fftshift(X) swaps the left and right halves of
X. For matrices,
fftshift(X) swaps the first quadrant with the third and the second quadrant with the fourth.
For higher-dimensional arrays,
fftshift(X) swaps "half-spaces" of
X along each dimension.
Y = fftshift(X,dim)
fftshift operation along the dimension
For any matrix
sum(sum(X)); the zero-frequency component of the signal is in the upper-left corner of the two-dimensional FFT. For
this zero-frequency component is near the center of the matrix.
© 1994-2005 The MathWorks, Inc.