Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

N-D fast Fourier transform

`Y = fftn(X)`

`Y = fftn(X,sz)`

`Y = fftn(`

returns
the multidimensional
Fourier transform of an N-D array using a fast Fourier transform
algorithm. The N-D transform is equivalent to computing the 1-D transform
along each dimension of `X`

)`X`

. The output `Y`

is
the same size as `X`

.

`Y = fftn(`

truncates `X`

,`sz`

)`X`

or
pads `X`

with trailing zeros before taking the transform
according to the elements of the vector `sz`

. Each
element of `sz`

defines the length of the corresponding
transform dimensions. For example, if `X`

is a 5-by-5-by-5
array, then `Y = fftn(X,[8 8 8])`

pads each dimension
with zeros resulting in an 8-by-8-by-8 transform `Y`

.