Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Shift zero-frequency component to center of spectrum

`Y = fftshift(X)`

`Y = fftshift(X,dim)`

`Y = fftshift(`

rearranges
a Fourier transform `X`

)`X`

by shifting the zero-frequency
component to the center of the array.

If

`X`

is a vector, then`fftshift`

swaps the left and right halves of`X`

.If

`X`

is a matrix, then`fftshift`

swaps the first quadrant of`X`

with the third, and the second quadrant with the fourth.If

`X`

is a multidimensional array, then`fftshift`

swaps half-spaces of`X`

along each dimension.

Was this topic helpful?