28.12.2012 Views

Figure Properties - SERC

Figure Properties - SERC

Figure Properties - SERC

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2fftshift<br />

Purpose Shift zero-frequency component of discrete Fourier transform to center of<br />

spectrum<br />

Syntax Y = fftshift(X)<br />

Y = fftshift(X,dim)<br />

fftshift<br />

Description Y = fftshift(X) rearranges the outputs of fft, fft2, and fftn by moving the<br />

zero-frequency component to the center of the array. It is useful for visualizing<br />

a Fourier transform with the zero-frequency component in the middle of the<br />

spectrum.<br />

For vectors, fftshift(X) swaps the left and right halves of X. For matrices,<br />

fftshift(X) swaps the first quadrant with the third and the second quadrant<br />

with the fourth.<br />

1<br />

2<br />

4 3<br />

For higher-dimensional arrays, fftshift(X) swaps “half-spaces” of X along<br />

each dimension.<br />

Y = fftshift(X,dim) applies the fftshift operation along the dimension<br />

dim.<br />

For dim = 1: For dim = 2:<br />

2-755

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!