Search for question
Question

Computer Assignment 3.1 1. Write a C program to generate a signal and store it in signal.dat: = s(n) 2cos[2π(.05)n] + sin[2л(.2)n] for n= 0, 1, ..., 255. 2. Find the discrete Fourier transform S(k) using a C program N-1 S(k)=s(n)e n=0 for k=0,1,..., -j2лnk/N 255 and plot the magnitude spectrum. Choose N to be 256. 3. Write a C program to design 16-point FIR lowpass filters with the cutoff frequency of 0.2π using the rectangular, Hamming, and Blackman windows. Compute and plot the magnitude and the phase response of each filter. Try N= 1000. 4. Write a C program to implement the FIR lowpass filter. Use s(n) of part 1 as the input and find the output of the filter. Use the filter designed using the Hamming window. Plot the input and the output.

Fig: 1