Image Processing Toolbox    
fftshift

Shift zero-frequency component of fast Fourier transform to center of spectrum

Syntax

Description

B = fftshift(A) rearranges the outputs of fft, fft2, and fftn by moving the zero frequency component to the center of the array.

For vectors, fftshift(A) swaps the left and right halves of A. For matrices, fftshift(A) swaps quadrants one and three of A with quadrants two and four. For higher-dimensional arrays, fftshift(A) swaps "half-spaces" of A along each dimension.

Class Support

The input matrix A can be of class double or of any integer class. The output matrix B is of the same class as A.

Remarks

fftshift is a function in MATLAB.

Example

See Also

fft2, fftn, ifftshift

fft in the MATLAB Function Reference


 fftn filter2