2.1 (a)
Show that the frequency response for the three-point running average operator is given by:
2.1 (b)
Matlab code:
bb = 1/3*ones(1,3);
ww = -pi:(pi/400):pi;
H = ((2*cos(ww)+1)/3).*exp(-i*ww);
subplot(2,1,1)
plot( ww, abs(H))%Magnitude
axis([-pi pi 0 1])
grid
title('Magnitude for frequency response of averaging filter')
subplot(2,1,2)
plot( ww, angle(H))%Phase
axis([-pi pi -pi pi])
grid
title('Phase of frequency response of averaging filter')
xlabel('NORMALIZED FREQUENCY')
Figure 1: Frequency response of averaging filter
2.1 (c)
Matlab code:
bb = 1/3*ones(1,3);
ww = -pi:(pi/200):pi;
H = freqz( bb, 1, ww );
subplot(2,1,1)
plot( ww, abs(H))%Magnitude
grid
subplot(2,1,2)
plot( ww, angle(H))%Phase
grid
xlabel('NORMALIZED FREQUENCY')
Figure 2: Frequency response of three point averager
© Copyright 2026 Paperzz