MATLAB Function Reference Previous page   Next Page

Two-dimensional discrete Fourier transform



Y = fft2(X) returns the two-dimensional discrete Fourier transform (DFT) of X, computed with a fast Fourier transform (FFT) algorithm. The result Y is the same size as X.

Y = fft2(X,m,n) truncates X, or pads X with zeros to create an m-by-n array before doing the transform. The result is m-by-n.


fft2(X) can be simply computed as

This computes the one-dimensional DFT of each column X, then of each row of the result. The execution time for fft depends on the length of the transform. It is fastest for powers of two. It is almost as fast for lengths that have only small prime factors. It is typically several times slower for lengths that are prime or which have large prime factors.

Data Type Support

fft2 supports inputs of data types double and single. If you call fft2 with the syntax y = fft2(X, ...), the output y has the same data type as the input X.

See Also

fft, fftn, fftw, fftshift, ifft2

Previous page  fft fftn Next page

© 1994-2005 The MathWorks, Inc.