Syntax Supported by the IML Procedure and the iml Action

IFFTC function

IFFTC (x) ;

This function is supported by the IML procedure and the iml action.

The IFFTC function computes the inverse finite Fourier transform of a complex-valued vector, where x is an n times 2 (or 2 times n) numeric matrix that represents a complex vector. The first column (or row) of x specifies the real components, and the second column (or row) specifies the imaginary components. (If x is a 2 times 2 matrix, the first row contains the real components, and the second row contains the imaginary components.)

The IFFTC function returns an n times 2 matrix that contains the complex Fourier coefficients that correspond to x. The first column of the matrix contains the real components of the Fourier coefficients, and the second column contains the imaginary components.

The inverse Fourier transform is related to the Fourier transform. The expression IFFTC(FFTC(x)) is equal to nx for every vector x. Similarly, FFTC(IFFTC(x)) equals nx.

The Fourier coefficients can be expressed in terms of a complex matrix multiplication. If the input x represents a complex column vector z of dimension n and if omega equals exp left-parenthesis minus 2 pi bold i slash n right-parenthesis, where bold i equals StartRoot negative 1 EndRoot, then define a n times n matrix W as

upper W equals Start 4 By 5 Matrix 1st Row 1st Column 1 2nd Column 1 3rd Column 1 4th Column ellipsis 5th Column 1 2nd Row 1st Column 1 2nd Column omega 3rd Column omega squared 4th Column ellipsis 5th Column omega Superscript n minus 1 Baseline 3rd Row 1st Column vertical-ellipsis 2nd Column vertical-ellipsis 3rd Column vertical-ellipsis 4th Column down-right-diagonal-ellipsis 5th Column vertical-ellipsis 4th Row 1st Column 1 2nd Column omega Superscript n minus 1 Baseline 3rd Column omega Superscript 2 left-parenthesis n minus 1 right-parenthesis Baseline 4th Column ellipsis 5th Column omega Superscript left-parenthesis n minus 1 right-parenthesis left-parenthesis n minus 1 right-parenthesis EndMatrix

Then the complex vector of Fourier coefficients is simply the product upper W z.

The following example demonstrates the IFFTC function:

/* sample every millisecond from 0 to 10 seconds */
t = do(0,10,0.001);
pi = constant("pi");
/* complex signal takes values on the unit circle and makes
   three full rotations per second in the *clockwise* direction */
freq = 3;
x = cos(2*pi*freq*t); y = sin(-2*pi*freq*t);
Signal = t(x) || t(y);
f = fftc(Signal);

/* reconstruct the original signal from the Fourier coefficients */
z = ifftc(f) / nrow(f);
maxDiff = max(abs(Signal - z));  /* this should be essentially zero */
print maxDiff;

Figure 154: Reconstructing a Complex Signal

maxDiff
4.874E-12


Last updated: March 08, 2024