% FPS, week3, EX01 % h=ones(1,5)/5; n=[0:4]; figure(1) stem(n,h) axis([-1 5 0 0.3]) xlabel('n index') ylabel('Amplitude') % frequency response [H W]=freqz(h, 1, 512, 'whole'); plot(W/pi, abs(H)); xlabel('\omega/\pi') ylabel('Magnitude') plot(W/pi, angle(H)/pi) xlabel('\omega/\pi') ylabel('Phase/\pi')