Friday, 22 April 2016

Discrete Fourier Transform

The DFT formula incorporates summation and twiddle factor, both of which took time to implement on C Code . 
Two separate code were written, one for 4 point and one for 8 point DFT. 8 point  DFT was calculated using 4 point DFT code.
 Real coefficient values of x[n] were taken as input array along with length of x[n]. Header file math.h  required for using sin() and cos().Real and imaginary parts of X[k] are computed independently using two different for loops and values are stored in two arrays. PI is defined globally for the C program. X[k] is finally displayed by retrieving the stored values for a particular value of 'k' from both arrays simultaneously. IDFT code is obtained by just reversing the process described above to obtain real coefficient values of x[n].


https://drive.google.com/open?id=0B2dvoOHjY9tfLUF2UVNtSDIyMHM

1 comment:

  1. The DFT is also used to efficiently solve partial differential equations, and to perform other operations such as convolutions or multiplying large integers.

    ReplyDelete