| Image Processing Toolbox | ![]() |
Compute N-dimensional fast Fourier transform
Syntax
B = fftn(A) B = fftn(A,siz)
Description
B = fftn(A) performs the N-dimensional fast Fourier transform. The result B is the same size as A.
B = fftn(A,siz) pads A with zeros (or truncates A) to create an N-dimensional array of size siz before doing the transform. The size of the result is siz.
Class Support
The input matrix A can be of class double or of any integer class. The output matrix B is of class double.
Remarks
Algorithm
B = A; for p = 1:length(size(A)) B = fft(B,[],p); end
This code computes the one-dimensional fast Fourier transform along each dimension of A. The time required to compute fftn(A) depends strongly on the number of prime factors of the dimensions of A. It is fastest when all of the dimensions are powers of 2.
See Also
fft in the MATLAB Function Reference
| fft2 | fftshift | ![]() |