You are here : matlabSignal Processingfftshift

fftshift() - Signal Processing

Y = fftshift(X) rearranges
the outputs of fft, fft2,
and 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.For vectors, 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) applies
the fftshift operation along the dimension dim.
Note:  


ifftshift will undo the results of fftshift.
If the matrix X contains an odd number of elements, ifftshift(fftshift(X)) must
be done to obtain the original X. Simply performing fftshift(X) twice
will not produce X.


Syntax

Y = fftshift(X)Y = fftshift(X,dim)


Example

Y = fft2(X)


Output / Return Value


Limitations


Alternatives / See Also


Reference