Question: I need help with this homework This is the code #include #include audio.h #define PI 3.14159265358979 #define N 100 #define TESTFREQ 800.0 #define SAMPLING_FREQ 8000.0
I need help with this homework

This is the code
#include
#define PI 3.14159265358979 #define N 100 #define TESTFREQ 800.0 #define SAMPLING_FREQ 8000.0
typedef struct { float real; float imag; } COMPLEX;
COMPLEX samples[N]; COMPLEX twiddle[N];
///////////////////////////////////////
This is the part of dftw which need to be complited
void dftw(COMPLEX *x, COMPLEX *w) {
/* TODO: write the dftw() function here. */ }
//////////////////////////////////////
int main() { int n;
TestPinInit(TEST_PIN);
for(n = 0; n
TestPinOut(TEST_PIN, HIGH); dftw(samples, twiddle); //call DFTW function TestPinOut(TEST_PIN, LOW);
while(1); }
Program dft.c illustrates the DFT of an N-point, real-valued sequence. Programdft.c will be used to calculate the complex DFT 2. 2tkn 3. As supplied, the program does not implement DFT. You must program the function dft (). Program dft.c is written so that an N-point complex sequence is stored in array samples and a pointer to this array is passed to the function dft (). That function is required to replace the complex, time-domain sequence passed to it with its complex, frequency domain representation, i.e. its DFT. A structure, COMPLEX, intended for the representation of complex numbers in rectangular form is defined in the program. Hint: It is important that you test your function using complex as well as real-valued input data Connect your FM4 Starter Kit to the host PC using a USB cable. Build the project by selecting Build target from the Project menu or by clicking on the Build toolbar button. Program dft.c illustrates the DFT of an N-point, real-valued sequence. Programdft.c will be used to calculate the complex DFT 2. 2tkn 3. As supplied, the program does not implement DFT. You must program the function dft (). Program dft.c is written so that an N-point complex sequence is stored in array samples and a pointer to this array is passed to the function dft (). That function is required to replace the complex, time-domain sequence passed to it with its complex, frequency domain representation, i.e. its DFT. A structure, COMPLEX, intended for the representation of complex numbers in rectangular form is defined in the program. Hint: It is important that you test your function using complex as well as real-valued input data Connect your FM4 Starter Kit to the host PC using a USB cable. Build the project by selecting Build target from the Project menu or by clicking on the Build toolbar button
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
