2-D fast Fourier transform

`Y = fft2(X)`

Y = fft2(X,m,n)

`Y = fft2(X)`

returns the
two-dimensional discrete Fourier transform (DFT) of `X`

.
The DFT is computed with a fast Fourier transform (FFT) algorithm.
The result, `Y`

, is the same size as `X`

.

If the dimensionality of `X`

is greater than `2`

,
the `fft2`

function returns the 2-D DFT for each
higher dimensional slice of `X`

. For example, if ```
size(X)
= [100 100 3]
```

, then `fft2`

computes the
DFT of `X(:,:,1)`

, `X(:,:,2)`

and `X(:,:,3)`

.

`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`

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`

.

Was this topic helpful?