Matlab Code - : %Q4 %length of Impulse Response
Matlab Code - : %Q4 %length of Impulse Response
MATLAB CODE –
%Q5
k=(hamming(N))';
h=hd.*k; %Type 3 LP impulse response
L=(N-1)/2; %L = Order of Hr
c=2*h(L+1:-1:1); %c = Type-3 LP filter coefficients
n=0:1:L;
w=(0:1:100)'*pi/100; %frequencies between [0 pi] over which Hr is
computed
Hr = sin(w*n)*c'; %Hr = Amplitude Response
plot(w/pi,Hr/pi);