Engee documentation

ifft2

Two-dimensional inverse fast Fourier transform.

Library

EngeeDSP

Syntax

Function call

  • X = ifft2(Y) — returns two-dimensional discrete inverse Fourier transform of a matrix using the fast Fourier transform algorithm. If Y is a multidimensional array, then the function ifft2 performs a two-dimensional inverse transformation for each dimension larger than 2. Output argument X has the same size as Y.

  • X = ifft2(Y,m,n) — truncates Y or complements Y with zeros to the end, forming a matrix of size m on n, before calculating the inverse transformation. X It also has a size m on n. If Y is a multidimensional array, then the function ifft2 forms the first two dimensions Y according to m and n.

  • X = ifft2(___,symflag) — defines symmetry Y in addition to any combinations of input arguments in the previous syntaxes. For example, ifft2(Y,"symmetric") examines the argument Y as conjugate-symmetric.

Arguments

Input arguments

# Y — input array

+ the matrix | multidimensional array

Details

The input array, specified as a matrix or multidimensional array. If Y has a type Float32, then the function ifft2 calculated with single precision, and X It also has a type Float32. Otherwise X returns as Float64.

Типы данных

Float64, Float32, Int8, Int16, Int32, UInt8, UInt16, UInt32, Bool

Support for complex numbers

Yes

# m — number of reverse conversion lines

+ a positive integer scalar

Details

The number of reverse conversion lines, set as a positive integer.

Типы данных

Float64, Float32, Int8, Int16, Int32, UInt8, UInt16, UInt32, Bool

# n is the number of reverse conversion columns

+ a positive integer scalar

Details

The number of reverse conversion columns, set as a positive integer.

Типы данных

Float64, Float32, Int8, Int16, Int32, UInt8, UInt16, UInt32, Bool

# symflag — type of symmetry

+ "nonsymmetric" (by default) | "symmetric"

Details

The type of symmetry defined as "nonsymmetric" or "symmetric". If the argumentative Y it is not exactly conjugate-symmetric due to rounding error., ifft2(Y,"symmetric") interprets Y as conjugate-symmetric, ignoring the second half of its elements (located in the negative frequency spectrum). For more information about conjugate symmetry, see Algorithms.

Output arguments

# X is the output array

+ the matrix | multidimensional array

Details

The output array returned as a matrix or multidimensional array.

Additional Info

Two-dimensional inverse Fourier transform

Details

This formula defines the discrete inverse Fourier transform. matrices size on :

Here and — complex roots of unity:



where — imaginary unit. varies from before , and — from before .

Algorithms

  • Function ifft2 checks whether the matrix is Y conjugate-symmetric. If Y conjugate-symmetric, the calculation of the inverse transformation is faster, and the output signal is real.

    Function is conjugate symmetric if . However, the fast Fourier transform of a two—dimensional time domain signal has half of the spectrum in positive frequencies and the other half in negative frequencies, with the first row and column reserved for zero frequencies. For this reason, the matrix Y It is conjugate symmetric if all the following conditions are met:

    • Y(1,2:end) is conjugate symmetric, or Y(1,2:end) = conj(Y(1,end:-1:2));

    • Y(2:end,1) is conjugate symmetric, or Y(2:end,1) = conj(Y(end:-1:2,1));

    • Y(2:end,2:end) is conjugate-centrosymmetric, or Y(2:end,2:end) = conj(Y(end:-1:2,end:-1:2)).