Documentation

ifftn

Multidimensional inverse fast Fourier transform

Syntax

X = ifftn(Y)
X = ifftn(Y,sz)
X = ifftn(___,symflag)

Description

example

X = ifftn(Y)returns themultidimensional discrete inverse Fourier transformof an N-D array using a fast Fourier transform algorithm. The N-D inverse transform is equivalent to computing the 1-D inverse transform along each dimension ofY. The outputXis the same size asY.

example

X = ifftn(Y,sz)truncatesYor padsYwith trailing zeros before taking the inverse transform according to the elements of the vectorsz. Each element ofszdefines the length of the corresponding transform dimension. For example, ifYis a 5-by-5-by-5 array, thenX = ifftn(Y,[8 8 8])pads each dimension with zeros, resulting in an 8-by-8-by-8 inverse transformX.

example

X = ifftn(___,symflag)specifies the symmetry ofY. For example,ifftn(Y,'symmetric')treatsYas conjugate symmetric.

Examples

collapse all

You can use theifftnfunction to convert multidimensional data sampled in frequency to data sampled in time or space. Theifftnfunction also allows you to control the size of the transform.

Create a 3-by-3-by-3 array and compute its inverse Fourier transform.

Y = rand(3,3,3); ifftn(Y);

Pad the dimensions ofYwith trailing zeros so that the transform has size 8-by-8-by-8.

X = ifftn(Y,[8 8 8]); size(X)
ans =8 8 8

近共轭对称的数组,您可以compute the inverse Fourier transform faster by specifying the'symmetric'option, which also ensures that the output is real.

Compute the 3-D inverse Fourier transform of a nearly conjugate symmetric array.

Y(:,:,1) = [1e-15*i 0; 1 0]; Y(:,:,2) = [0 1; 0 1]; X = ifftn(Y,'symmetric')
X = (:,:,1) = 0.3750 -0.1250 -0.1250 -0.1250 (:,:,2) = -0.1250 0.3750 -0.1250 -0.1250

Input Arguments

collapse all

Input array, specified as a vector, a matrix, or a multidimensional array. IfYis of typesingle, thenifftnnatively computes in single precision, andXis also of typesingle. Otherwise,Xis returned as typedouble.

Data Types:double|single|int8|int16|int32|uint8|uint16|uint32|logical
Complex Number Support:Yes

Lengths of inverse transform dimensions, specified as a vector of positive integers.

Data Types:double|single|int8|int16|int32|uint8|uint16|uint32|logical

Symmetry type, specified as'nonsymmetric'or'symmetric'. WhenYis not exactly conjugate symmetric due to round-off error,ifftn(Y,'symmetric')treatsYas if it were conjugate symmetric. For more information on conjugate symmetry, seeAlgorithms.

More About

collapse all

N-D Inverse Fourier Transform

The discrete inverse Fourier transformXof anN-D arrayYis defined as

X p 1 , p 2 , ... , p N = j 1 = 1 m 1 1 m 1 ω m 1 p 1 j 1 j 2 = 1 m 2 1 m 2 ω m 2 p 2 j 2 ... j N = 1 m N 1 m N ω m N p N j N Y j 1 , j 2 , ... , j N .

Each dimension has lengthmkfork= 1,2,...,N, and ω m k = e 2 π i / m k are complex roots of unity whereiis the imaginary unit.

Algorithms

  • Theifftnfunction tests whether the vectors in an arrayYare conjugate symmetric in all dimensions. A vectorvis conjugate symmetric when theith element satisfiesv(i) = conj(v([1,end:-1:2])). If the vectors inYare conjugate symmetric in all dimensions, then the inverse transform computation is faster and the output is real.

Extended Capabilities

Introduced before R2006a

Was this topic helpful?