Discrete Fourier Transform

In the field of Mathematics, the Discrete Fourier Transform (DFT) is a way to convert a finite list of samples of a function (Complex Numbers) into a list of coefficients of a finite combination of complex sinusoids, ordered by their frequencies.

In Digital Signal Processing, the samples can be signals varying over time. For example, pressure of a sound wave, a radio signal etc.

The following is the basic fundamental equation behind the Discrete Fourier Transform:

Sample Input (N = 8)

DFT Output

The program below takes about 235.013 millseconds to calculate the DFT for 1024 samples. This is not as efficient as we would want it to be. This is when the FFT algorithms solves the efficiency problem.