用matlab设计巴特沃斯IIR数字低通滤波器对其进行信号处理(要matlab程序)

2024-12-18 20:05:47
推荐回答(1个)
回答1:

Wp=0.2;Ws=0.3;Ap=1;As=15;
[N,wc]=buttord(Wp,Ws,Ap,As);
[b,a]=butter(N,wc);
xn=[-4,-2,0,-4,-6,-4,-2,-4,-6,-6,-4,-4,-6,-6,-2,6,12,8,0,-16,-38,-60,-84,-90,-66,-32,-4,-2,-4,8,12,12,10,6,6,6,4,0,0,0,0,0,-2,-4,0,0,0,-2,-2,0,0,-2,-2,-2,-2,0];
yn=filter(b,a,xn);
stem(yn)
或plot(yn)