资 源 简 介
clc;全部关闭;%%Speci证书:ws1=0.3*pi;%下阻带边wp1=0.4*pi;%下通带边wp2=0.5*pi;%上通带边ws2=0.6*pi;%上阻带边Rp=0.5;%通带波纹度=40;%阻带衰减%%选择最小值(delta1,delta2),因为在windodow设计中delta1=delta2[delta1,delta2]=db2delta(Rp,As);如果(delta1<;delta2)delta2=delta1;disp("delta1小于delta2")[Rp,As]=delta2db(delta1,delta2)end%确定Kaiser窗参数str_width=abs(min((wp1-ws1),(ws2-wp2));M=ceil((As-7.95)/(2.285*tr_width)+1)+1;M=2*floor(M/2)+3%,选择奇数MM=49n=[0:1:M-1];beta=0.1102*(As-8.7);w_kai=(Kaiser(M,beta))";%Kaiser窗%确定理想脉冲响应wc1=(ws1+wp1)/2;wc2=(ws2+wp2)/2;hd=理想脉冲响应(wc2,M)-理想脉冲响应(wc1,M);%确定窗设计脉冲响应和频率响应