Signal Processing Toolbox Help Desk

fftshift

Purpose

Rearrange the outputs of fft and fft2.

Syntax

Description

y = fftshift(x) rearranges the outputs of fft and fft2 by moving the zero frequency component to the center of the spectrum, which is sometimes a more convenient form.

For vectors, fftshift(x) returns a vector with the left and right halves swapped.

For arrays, fftshift(x) swaps quadrants one and three with quadrants two and four.

This function is part of the main MATLAB environment.

Example

For any array X,

has Y(1,1) = sum(sum(X)); the DC component of the signal is in the upper-left corner of the two-dimensional FFT. For

the DC component is near the center of the matrix.

See Also

fft

One-dimensional fast Fourier transform.

fft2

Two-dimensional fast Fourier transform.



[ Previous | Help Desk | Next ]