Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

a) Consider the 7-point FIR filter: hiln]-{ 1.25, 0.5,2.1, 0,2.1, 0.5, 1.25} (i)

ID: 2249798 • Letter: A

Question

a) Consider the 7-point FIR filter: hiln]-{ 1.25, 0.5,2.1, 0,2.1, 0.5, 1.25} (i) Sketch the impulse response, and determine if the filter is linear-phase. Ifso, which category of linear-phase FIR filters does it correspond to (Type 1-4)? (ii) Sketch the direct form and transpose filter structures for hi[n (iii) Based on your answer to part (i), exploit symmetry to reduce the number of mul tiplier elements in the structure. (iv) Draw a cascade-filter structure for hin consisting of three first/second-order sec- tions. To factorize H(2), you may use the roots command in MATLAB

Explanation / Answer

clear all;

close all;

%x=[1 2 3 4]

x=input('enter the input sequence');

n=input('enter the lenth of DFT');

subplot(4,1,1);

stem(x);

xlabel('time');

ylabel('amplitude');

title('input signal');

y=fft(x,n);

subplot(4,1,2);

stem(y);

xlabel('frequency');

ylabel('amplitude');

title('discrete fourier transform');

z=abs(y);

subplot(4,1,3);

stem(z);

xlabel('frequency');

ylabel('magnitude');

u=angle(y);

subplot(4,1,4);

stem(u);

xlabel('frequency');

ylabel('phase plot');

gtext('kl university')

output :

enter the input sequence[1 2 3 4]

enter the lenth of DFT1