2-D inverse fast Fourier transform
X = ifft2(Y)
X = ifft2(Y,m,n)
X = ifft2(___,symflag)
X = ifft2( returns
discrete inverse Fourier transform of a matrix using a fast
Fourier transform algorithm. If
Y is a multidimensional
ifft2 takes the 2-D inverse transform
of each dimension higher than 2. The output
the same size as
You can use the
ifft2 function to convert 2-D signals sampled in frequency to signals sampled in time or space. The
ifft2 function also allows you to control the size of the transform.
Create a 3-by-3 matrix and compute its Fourier transform.
X = magic(3)
X = 8 1 6 3 5 7 4 9 2
Y = fft2(X)
Y = 45.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 13.5000 + 7.7942i 0.0000 - 5.1962i 0.0000 - 0.0000i 0.0000 + 5.1962i 13.5000 - 7.7942i
Take the inverse transform of
Y, which is the same as the original matrix
X, up to round-off error.
ans = 8.0000 1.0000 6.0000 3.0000 5.0000 7.0000 4.0000 9.0000 2.0000
Pad both dimensions of
Y with trailing zeros so that the transform has size 8-by-8.
Z = ifft2(Y,8,8); size(Z)
ans = 8 8
For nearly conjugate symmetric matrices, you can compute the inverse Fourier transform faster by specifying the
'symmetric' option, which also ensures that the output is real.
Compute the 2-D inverse Fourier transform of a nearly conjugate symmetric matrix.
Y = [3+1e-15*i 5; 5 3]; X = ifft2(Y,'symmetric')
X = 4 0 0 -1
Y— Input array
Input array, specified as a matrix or a multidimensional array.
Y is of type
computes in single precision, and
X is also of
returned as type
Complex Number Support: Yes
m— Number of inverse transform rows
Number of inverse transform rows, specified as a positive integer scalar.
n— Number of inverse transform columns
Number of inverse transform columns, specified as a positive integer scalar.
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.
This formula defines the discrete inverse Fourier transform X of an m-by-n matrix Y:
ωm and ωn are complex roots of unity:
i is the imaginary unit. p runs from 1 to m and q runs from 1 to n.
ifft2 function tests whether
the vectors in a matrix
Y are conjugate symmetric
in both dimensions. A vector
v is conjugate symmetric
when the ith element satisfies
conj(v([1,end:-1:2])). If the vectors in
conjugate symmetric in both dimensions, then the inverse transform
computation is faster and the output is real.
Usage notes and limitations:
Does not support the