滑动平均系统
系统的表达式
H(ejw)=1M2+11−ejw(M2+1)1−e−jwH(e^{jw})=\frac{1}{M_{2}+1}\frac{1-e^{jw(M_2+1)}}{1-e^{-jw}}H(ejw)=M2+111−e−jw1−ejw(M2+1)
clc
clear
syms w M2
y=1/(M2+1)*exp(-j*w*M2/2)*sin((M2+1)*w/2)/(sin(w/2));
y=subs(y,M2,4);
subplot(1,2,1)
ezplot(abs(y),[-2*pi 2*pi]);
title(['$' 'H(w)=' '$''$' latex(y) '$'],'interpreter','latex')
grid on
subplot(1,2,2)
ezplot(angle(y),[-2*pi 2*pi]);
title(['$' latex(angle(y)) '$'],'interpreter','latex')
grid on