# ifft

Inverse fast Fourier transform

## Syntax

`y = ifft(X)y = ifft(X,n)y = ifft(X,[],dim)y = ifft(X,n,dim)y = ifft(..., 'symmetric')y = ifft(..., 'nonsymmetric')`

## Description

`y = ifft(X)` returns the inverse discrete Fourier transform (DFT) of vector `X`, computed with a fast Fourier transform (FFT) algorithm. If `X` is a matrix, `ifft` returns the inverse DFT of each column of the matrix.

`ifft` tests `X` to see whether vectors in `X` along the active dimension are conjugate symmetric. If so, the computation is faster and the output is real. An `N`-element vector `x` is conjugate symmetric if ```x(i) = conj(x(mod(N-i+1,N)+1))``` for each element of `x`.

If `X` is a multidimensional array, `ifft` operates on the first non-singleton dimension.

`y = ifft(X,n)` returns the `n`-point inverse DFT of vector `X`.

`y = ifft(X,[],dim)` and `y = ifft(X,n,dim)` return the inverse DFT of `X` across the dimension `dim`.

`y = ifft(..., 'symmetric')` causes `ifft` to treat `X` as conjugate symmetric along the active dimension. This option is useful when `X` is not exactly conjugate symmetric, merely because of round-off error.

`y = ifft(..., 'nonsymmetric')` is the same as calling `ifft(...)` without the argument `'nonsymmetric'`.

For any `X`, `ifft(fft(X))` equals `X` to within roundoff error.

## Data Type Support

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

collapse all

### Algorithms

The algorithm for `ifft(X)` is the same as the algorithm for `fft(X)`, except for a sign change and a scale factor of `n = length(X)`. As for `fft`, the execution time for `ifft` 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.

 Note   You might be able to increase the speed of `ifft` using the utility function `fftw`, which controls how MATLAB® software optimizes the algorithm used to compute an FFT of a particular size and dimension.