Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

ifftn

Multidimensional inverse fast Fourier transform

Syntax

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

Description

example

X = ifftn(Y) returns the multidimensional discrete inverse Fourier transform of 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 of Y. The output X is the same size as Y.

example

X = ifftn(Y,sz) truncates Y or pads Y with trailing zeros before taking the inverse transform according to the elements of the vector sz. Each element of sz defines the length of the corresponding transform dimension. For example, if Y is a 5-by-5-by-5 array, then X = ifftn(Y,[8 8 8]) pads each dimension with zeros, resulting in an 8-by-8-by-8 inverse transform X.

example

X = ifftn(___,symflag) specifies the symmetry of Y. For example, ifftn(Y,'symmetric') treats Y as conjugate symmetric.

Examples

collapse all

You can use the ifftn function to convert multidimensional data sampled in frequency to data sampled in time or space. The ifftn function 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 of Y with 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

For nearly conjugate symmetric arrays, you can 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 = 
X(:,:,1) =

    0.3750   -0.1250
   -0.1250   -0.1250


X(:,:,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. If Y is of type single, then ifftn natively computes in single precision, and X is also of type single. Otherwise, X is returned as type double.

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'. When Y is not exactly conjugate symmetric due to round-off error, ifftn(Y,'symmetric') treats Y as if it were conjugate symmetric. For more information on conjugate symmetry, see Algorithms.

More About

collapse all

N-D Inverse Fourier Transform

The discrete inverse Fourier transform X of an N-D array Y is defined as

Xp1,p2,...,pN=j1=1m11m1ωm1p1j1j2=1m21m2ωm2p2j2...jN=1mN1mNωmNpNjNYj1,j2,...,jN.

Each dimension has length mk for k = 1,2,...,N, and ωmk=e2πi/mk are complex roots of unity where i is the imaginary unit.

Algorithms

  • The ifftn function tests whether the vectors in an array Y are conjugate symmetric in all dimensions. A vector v is conjugate symmetric when the ith element satisfies v(i) = conj(v([1,end:-1:2])). If the vectors in Y are conjugate symmetric in all dimensions, then the inverse transform computation is faster and the output is real.

Extended Capabilities

See Also

| | | |

Introduced before R2006a

Was this topic helpful?