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
Xis a vector, thenfftshiftswaps the left and right halves ofX.If
Xis a matrix, thenfftshiftswaps the first quadrant ofXwith the third, and the second quadrant with the fourth.If
Xis a multidimensional array, thenfftshiftswaps half-spaces ofXalong each dimension.