全文预览

数字信号处理实验三

上传者:火锅鸡 |  格式:docx  |  页数:24 |  大小:628KB

文档介绍
=buttord(wp,ws,rp,rs,'s')Р[b,a]=butter(n,wc,'stop','s');Рw=0:0.002:5;Р[h,w]=freqs(b,a,w);Рh=20*log10(abs(h));Рplot(w,h,'b-')Рdisp('cheb1ord')Р[n,wpo]=cheb1ord(wp,ws,rp,rs,'s')Р[b,a]=cheby1(n,rp,wpo,'stop','s');Р[h,w]=freqs(b,a,w);Рh=20*log10(abs(h));Рhold onРplot(w,h,'r-')Рdisp('cheb2ord')Р[n,wso]=cheb2ord(wp,ws,rp,rs,'s')Р[b,a]=cheby2(n,rs,wso,'stop','s');Р[h,w]=freqs(b,a,w);Рh=20*log10(abs(h));Рhold onРplot(w,h,'k-')Рdisp('ellipord')Р[n,wc]=ellipord(wp,ws,rp,rs,'s')Р[b,a]=ellip(n,rp,rs,wc,'stop','s');Р[h,w]=freqs(b,a,w);Рh=20*log10(abs(h));Рhold onРplot(w,h,'g-')Рlegend('butter','cheby1','cheby2','ellip',4)Рgrid onРaxis([0,5,-120,20])Рxlabel('w')Рylabel('h')Р运行结果:РbuttordРn =Р 10Рwc =Р 1.2726 2.2684Рcheb1ordРn =Р 6Рwpo =Р 1.2252 2.3561Рcheb2ordРn =Р 6Рwso =Р 1.3845 2.0851РellipordРn =Р 5

收藏

分享

举报
下载此文档