Computes inverse discrete Fourier transform.
Parameters: x (Nx1 vector) – values used to computer the inverse of the discrete Fourier transform. Returns: y (Nx1 vector) – the inverse discrete Fourier transform.
// Set k k = seqa(0, 1, 4); // Compute discrete frequencies f_k = 5 + 2 * cos(pi/2*k - 90*pi/180) + 3 * cos(pi*k);
f_k is equal to:
8 4 8 0
// Discrete Fourier transform x = dfft(f_k); // Inverse Fourier transform y = dffti(x);
x = 5 0 - 1i 3 + 0i 0 + 1i y = 8 + 0i 4 + 0i 8 + 0i 0 + 0i
The transform is divided by \(N\).
This uses a second-order Goertzel algorithm. It is considerably slower
ffti(), but it may have some advantages in some circumstances. For
one thing, \(N\) does not have to be an even power of 2.