Main Content


Inverse fast Fourier transform of Galois field vector



y = ifft(x) computes the inverse discrete Fourier transform (DFT) of the Galois field vector x.


collapse all

Define parameters for Galois field order and input length.

m = 4; % Galois field order
n = 2^m-1; % Length of input vector

Specify a primitive element in the Galois field (GF). Generate the matrices for the corresponding DFT and inverse DFT.

alph = gf(2,m);
dm = dftmtx(alph);
idm = dftmtx(1/alph);

Generate a random GF vector.

x = gf(randi([0 2^m-1],n,1),m);

Perform the Fourier transform twice, once using the function and once using multiplication with the DFT matrix.

y1 = fft(x);
y2 = dm*x;

Invert the transform, using the function and multiplication with the inverse DFT matrix.

z1 = ifft(y1);
z2 = idm*y2;

Confirm that both results match the original input.

ans = logical

Input Arguments

collapse all

Input vector, specified as a vector with Galois field entries. The entries of x must be in the Galois field GF(2 m).

Data Types: gf

Output Arguments

collapse all

Inverse DFT of the input vector x, returned as a vector with Galois field entries.

Data Types: gf


The Galois field, GF(2m), over which this function works must have 256 or fewer elements. In other words, m must be an integer in the range [1, 8].


If x is a column vector, ifft applies dftmtx to the multiplicative inverse of the primitive element of the Galois field and multiplies the resulting matrix by x. If x is a row vector, the order of the matrix multiplication is reversed.

Version History

Introduced before R2006a