fftshift
Shift zero-frequency component to center of spectrum
Syntax
Y = fftshift(X)
Y = fftshift(X,dim)
Description
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, thenfftshift
swaps the left and right halves ofX
.If
X
is a matrix, thenfftshift
swaps the first quadrant ofX
with the third, and the second quadrant with the fourth.If
X
is a multidimensional array, thenfftshift
swaps half-spaces ofX
along each dimension.