Back to Fourier Analysis
fftshift
Shift zero-frequency component to center
Syntax
Y = fftshift(X)
Description
Rearranges the output of `fft` by shifting the zero-frequency component to the center of the array. Useful for visualizing the Fourier transform with the DC component in the middle.
Parameters
| Name | Description |
|---|---|
| X | Input array (typically output of fft) |
Returns
Shifted array
Examples
Try It
>> fftshift(fft([1 2 3 4 5 6 7 8]))