Engee documentation

ifft

The inverse fast Fourier transform.

Library

EngeeDSP

Syntax

Function call

  • X = ifft(Y) — calculates the opposite discrete Fourier transform for Y using the fast Fourier transform algorithm. Argument X has the same size as Y.

    • If Y — vector, then ifft(Y) returns the inverse transformation of the vector.

    • If Y — the matrix, then ifft(Y) returns the inverse transformation of each column of the matrix.

    • If Y — a multidimensional array, then ifft(Y) considers values in the first dimension whose size is not equal to 1, as vectors, and returns the inverse transformation of each vector.

  • X = ifft(Y,n) — returns n-point inverse Fourier transform for Y by adding Y with zeros up to the length n.

  • X = ifft(Y,n,dim) — returns the inverse Fourier transform in dimension dim. For example, if Y — the matrix, then ifft(Y,n,2) returns n-point reverse conversion for each row.

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

Arguments

Input arguments

# Y — input array

+ vector | the matrix | multidimensional array

Details

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

Data types

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

Support for complex numbers

Yes

# n is the length of the inverse transformation

+ [] (by default) | a non-negative integer scalar

Details

The length of the inverse transformation is given as [] or a non-negative integer. Addition Y zeros by specifying a conversion length greater than the length Y, can improve the performance of the function ifft. The length is usually specified as a power of two or the product of small primes. If n less than the length of the signal, then the function ifft ignores the remaining signal values after n-th element and returns a truncated result. If n equally 0, then the function ifft returns an empty matrix.

Data types

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

# dim — the measurement for which the operation is performed

+ a positive integer scalar

Details

The dimension that the operation is performed on is set as a positive integer. By default dim — the first dimension of the array, the size of which is not equal to 1. For example, consider the matrix Y.

  • ifft(Y,[],1) returns the inverse Fourier transform for each column.

    ifft 1

  • ifft(Y,[],2) returns the inverse Fourier transform for each row.

    ifft 2

Data types

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

# symflag — type of symmetry

+ "nonsymmetric" (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., ifft(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 — output array

Details

The output array returned as a vector, matrix, or multidimensional array.

Additional Info

Discrete Fourier transform of a vector

Y = fft(X) and X = ifft(Y) implement the Fourier transform and the inverse Fourier transform, respectively. For X and Y lengths n these transformations are defined as follows:



where — one of the roots of one.

Algorithms

  • Function ifft checks whether the vectors in Y conjugate-symmetric. If the vectors are in Y If they are conjugately symmetric, then 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 the time domain signal has half of the spectrum in positive frequencies and the other half in negative frequencies, with the first element reserved for the zero frequency. For this reason, the vector v is conjugate symmetric when v(2:end) equally conj(v(end:-1:2)).