Inverse fast Fourier transform
X = ifft(Y)
X = ifft(Y,n)
X = ifft(Y,n,dim)
X = ifft(___,symflag)
Y is a vector, then
the inverse transform of the vector.
Y is a matrix, then
the inverse transform of each column of the matrix.
Y is a multidimensional array,
ifft(Y) treats the values along the first
dimension whose size does not equal 1 as vectors and returns the inverse
transform of each vector.
The Fourier transform and its inverse convert between data sampled in time and space and data sampled in frequency.
Create a vector and compute its Fourier transform.
X = [1 2 3 4 5]; Y = fft(X)
Y = 15.0000 + 0.0000i -2.5000 + 3.4410i -2.5000 + 0.8123i -2.5000 - 0.8123i -2.5000 - 3.4410i
Compute the inverse transform of
Y, which is the same as the original vector
ans = 1 2 3 4 5
ifft function allows you to control the size of the transform.
Create a random 5-by-5 matrix and compute the 8-point inverse Fourier transform of each row. Each row of the result has length 8.
Y = rand(3,5); n = 8; X = ifft(Y,n,2); size(X)
ans = 3 8
For nearly conjugate symmetric vectors, you can compute the inverse Fourier transform faster by specifying the
'symmetric' option, which also ensures that the output is real.
Create a vector
Y that is nearly conjugate symmetric and compute its inverse Fourier transform.
V = 1:3; Y = [V+1e-15i flip(V)]
Y = 1.0000 + 0.0000i 2.0000 + 0.0000i 3.0000 + 0.0000i 3.0000 + 0.0000i 2.0000 + 0.0000i 1.0000 + 0.0000i
X = ifft(Y,'symmetric')
X = 2.3333 -0.5000 -0.1667 0 -0.1667 -0.5000
Y— Input array
Input array, specified as a vector, a matrix, or a multidimensional
Y is of type
ifft natively computes in single precision,
X is also of type
X is returned as type
Complex Number Support: Yes
n— Inverse transform length
(default) | nonnegative integer scalar
Inverse transform length, specified as
a nonnegative integer scalar. Padding
Y with zeros
by specifying a transform length larger than the length of
improve the performance of
ifft. The length is
typically specified as a power of 2 or a product of small prime numbers.
n is less than the length of the signal, then
the remaining signal values past the
and returns the truncated result. If
n is 0, then
an empty matrix.
dim— Dimension to operate along
Dimension to operate along, specified as a positive integer
scalar. By default,
dim is the first array dimension
whose size does not equal 1. For example, consider a matrix
ifft(Y,,1) returns the inverse
Fourier transform of each column.
ifft(Y,,2) returns the inverse
Fourier transform of each row.
symflag— Symmetry type
Symmetry type, specified as
Y is not exactly conjugate symmetric due to
if it were conjugate symmetric. For more information on conjugate
symmetry, see Algorithms.
Y = fft(X) and
= ifft(Y) implement the Fourier transform and inverse Fourier
transform, respectively. For
n, these transforms are defined as follows:
is one of n roots of unity.
ifft function tests whether
the vectors in
Y are conjugate symmetric. A vector
conjugate symmetric when the ith element satisfies
= conj(v([1,end:-1:2])). If the vectors in
conjugate symmetric, then the inverse transform computation is faster
and the output is real.
Usage notes and limitations:
Output is complex.
The symmetry type option does not support
See Variable-Sizing Restrictions for Code Generation of Toolbox Functions (MATLAB Coder).