discrete Fourier transform (DFT) converts a finite list of equally spaced samples of a function into the list of coefficients of a finite combination of complex sinusoids, ordered by their frequencies, that has those same sample values.
The following Matlab project contains the source code and Matlab examples used for radix 2 dft algorithm for real data.
Computes the DFT of N real values and returns the first
N/2+1 DFT coefficients. N is an integral power of two.