MATLAB滤波器设计.doc

  1. 1、本文档共10页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
MATLAB作业 第一题 已知:h(n)={-4, 1, -1, -2,5,5,-2,-1,1,-4},参照实验内容5的程序或自编程序确定并绘出第二种线性相位滤波器的单位冲激响应h(n)和振幅响应Hr(ω). 已知:h(n)={-4, 1, -1, -2,5,0, -5, 2, 1,-1, 4},参照实验内容5的程序或自编程序确定第三种线性相位滤波器的单位冲激响应h(n)和振幅响应Hr(ω). h=[-4,1,-1,-2 ,5,0,-5,2,1,-1,4]; N=length(h);n=0:N-1; [Hr,w,c,L]=Hr_Type3(h); amax=max(c)+1;;amin=min(c)-1; subplot(2,2,1);stem(n,h); axis([-1 2*L+1 amin amax]) xlabel(n);ylabel(h(n)); title(Impulse Response) subplot(223);stem(0:L,c); axis([-1 2*L+1 amin amax]) xlabel(n);ylabel(c(n)); title(a(n)coefficients) subplot(222); plot(w/pi,Hr);grid xlabel(Frequency in pi units);ylabel(Hr) title(Type-1 Amplitude Response) subplot(224);zplane(h,1); 已知:h(n)={-4, 1, -1, -2,5,-5,2,1,-1, 4},参照实验内容5的程序或自编程序确定第四种线性相位滤波器的单位冲激响应h(n)和振幅响应Hr(ω). h=[-4,1,-1,-2 ,5,-5,2,1,-1,4]; N=length(h);n=0:N-1; [Hr,w,d,L]=Hr_Type4(h); amax=max(d)+1;;amin=min(d)-1; subplot(2,2,1);stem(n,h); axis([-1 2*L+1 amin amax]) xlabel(n);ylabel(h(n)); title(Impulse Response) subplot(223);stem(1:L,d); axis([-1 2*L+1 amin amax]) xlabel(n);ylabel(d(n)); title(a(n)coefficients) subplot(222); plot(w/pi,Hr);grid xlabel(Frequency in pi units);ylabel(Hr) title(Type-1 Amplitude Response) subplot(224);zplane(h,1); 第二题利用窗函数设计FIR滤波器2:参照实验内容7的程序或自编程序来实现 设计具有指标 ωp=0.4π, Rp=0.25dB, ωs=0.2π, As=50dB的高通数字FIR滤波器。选择合适的窗函数,确定并画出滤波器的冲激响应和频率响应。 % Highpass filter design - Hamming window wp = 0.4*pi; ws = 0.2*pi; tr_width = wp - ws; M = ceil(6.6*pi/tr_width) + 1; n=[0:1:M-1]; wc = (ws+wp)/2; hd = ideal_lp(wc,M); w_ham = (hamming(M)); h = hd .* w_ham; [db,mag,pha,grd,w] = freqz_m(h,[1]); delta_w = 2*pi/1000; Rp = -(min(db(1:1:wp/delta_w+1))) % Passband Ripple As = -round(max(db(ws/delta_w+1:1:501))) % Min Stopband attenuation % plots subplot(1,1,1) subplot(2,2,1); stem(n,hd); title(Ideal Impulse Response) axis([0 M-1 -0.1 0.3]); xlabel(n); ylabel(hd(n)) subplot(2,2,2); stem(n,w_ham);title(Hamming Window) axis([0 M-1 0 1.1]); xlabel(n); ylabel(w(n)) subplot(2,2,3); stem(n,h);title(Actual Impulse Response) axis([0 M-1 -0.1 0.3]); xlab

文档评论(0)

7ky170ms8 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档