This repository is a simple implementation of the discrete Fourier transform (DFT) in the C programming language using only standard libraries.
The DFT in this example is run on a sample provided within the code, in this case 18 samples of the function:
Mathematically, each element k in the DFT is the summation:
which is implemented by breaking it down into its real and imaginary parts using Euler's identity. The full array of
The inverse of this transform, implemented in the code as iDFT, is as follows:
Where Euler's identity is again used in the implementation to make this calculation purely real. The full sample from