fftshift
|
Page in progress. |
The shift of the constant component to the center of the spectrum.
| Library |
|
Syntax
Function call
-
Y = fftshift(X)— rewrites the Fourier transform of the arrayX, shifting the constant component to the center of the array.-
If
X— vector, then functionfftshiftswaps the left and right halvesX. -
If
X— the matrix, then the functionfftshiftswaps the first quadrantXwith the third, and the second quadrant with the fourth. -
If
X— a multidimensional array, then the functionfftshiftswaps half spacesXfor each dimension.
-
Arguments
Input arguments
# X — input array
+
vector | matrix | multidimensional array
Details
An input array specified as a vector, matrix, or multidimensional array.
| Data types |
|
| Support for complex numbers |
Yes |
# dim — the measurement by which the operation is performed
+
positive integer scalar
Details
The dimension on which the operation is performed is specified as a positive integer. If the value is not specified, then the function fftshift swaps all dimensions.
-
Consider the input matrix
Xc. Operationfftshift(Xc,1)swaps the halves of each column of the matrixXc. -
Consider the matrix
Xr. Operationfftshift(Xr,2)swaps the halves of each row of the matrixXr.
| Data types |
|
Output arguments
# Y — output array
Details
The output array returned as a vector, matrix, or multidimensional array.