收藏 分销(赏)

数字信号处理MATLAB实验50题.doc

上传人:精*** 文档编号:2578558 上传时间:2024-06-01 格式:DOC 页数:24 大小:161.04KB 下载积分:10 金币
下载 相关 举报
数字信号处理MATLAB实验50题.doc_第1页
第1页 / 共24页
数字信号处理MATLAB实验50题.doc_第2页
第2页 / 共24页


点击查看更多>>
资源描述
数字信号处理MATLAB实验50题 ———————————————————————————————— 作者: ———————————————————————————————— 日期: 24 个人收集整理 勿做商业用途 1—1 clc; b=[1,1];a=[1,—0.5]; subplot(3,1,1);zplane(b,a);title('因果系统零极图’); n=0:50; x=3*cos(pi*n/3); y=filter(b,a,x); subplot(3,1,2);stem(n,x,’.');title(’输入x的波形’); subplot(3,1,3);stem(n,y,’.');title('输出y的波形’); 1-2 b=[1,1,1];a=[1,0。5,-0。25]; subplot(3,1,1);zplane(b,a);title('因果系统零极图’); n=0:50; x=3*cos(pi*n/3); y=filter(b,a,x); subplot(3,1,2);stem(n,x,’。’);title('输入x的波形'); subplot(3,1,3);stem(n,y,'。’);title('输出y的波形’); 2 clear; clc; b=[0,1];a=[1,-1,—1]; x=impseq(0,-5,50);n=-5:50; h=filter(b,a,x); stem(n,h,'。'); title('单位脉冲响应’) sum(abs(h)) 3 b=[2]; a=[1 —0.8 -0。5]; subplot(4,1,1); zplane(b,a); title('系统的零极图'); [H,w]=freqz(b,a,100,’whole’); magH=abs(H); phaH=angle(H); subplot(4,1,2); plot(w/pi,magH); title(’系统的幅频响应’); subplot(4,1,3); plot(w/pi,phaH/pi); title(’系统的相频响应'); n=0:100; x=impseq(0,0,100); h=filter(b,a,x); subplot(4,1,4); stem(n,h,'.'); title('系统的冲激响应’); 4 b=[1 1]; a=[1 —0。9 0。81]; [H,w]=freqz(b,a,400,'whole’); magH=abs(H); phaH=angle(H); subplot(4,1,1); plot(w/pi,magH); title('系统的幅频响应'); subplot(4,1,2); plot(w/pi,phaH/pi); title(’系统的相频响应’); n=0:200; x=sin(pi*n/3)+5*cos(pi*n); y=filter(b,a,x); subplot(4,1,3); plot(n,x); title(’输入信号X’); subplot(4,1,4); plot(n,y); title(’输出信号Y’); grid; 5 x11=[1 1 1 1]; n=0:5; x12=cos(pi*n/4); y11=circonvt(x11,x12,8) y12=conv(x11,x12) y13=[y11(1:1:8),zeros(1,1)] e1=y13—y12 x21=[1 -1 1 —1]; x22=[1 0 —1 0]; y21=circonvt(x21,x22,5) y22=conv(x21,x22) y23=[y21(1:1:5),zeros(1,2)] e2=y23-y22 n=0:15; x31=cos(2*pi*n/32); x32=sin(2*pi*n/32); y31=circonvt(x31,x32,32) y32=conv(x31,x32) y33=[y32(1:1:31),zeros(1,1)] e3=y31-y33 n=0:9; x41=(0.8)。^n; x42=(—0。8).^n; y41=circonvt(x41,x42,15) y42=conv(x41,x42) y43=[y41(1:1:15),zeros(1,4)] e4=y43-y42 6 clear; clc; x1=[2 1 1 2]; x2=[1 -1 —1 1]; n=[0:8-1]; y11=circonvt(x1,x2,4) y12=circonvt(x1,x2,7) y13=circonvt(x1,x2,8) y2=conv(x1,x2) %N最小值7 7——1 x=[2,2,2,2,2,2,2,2];w=[0:1:500]*2*pi/500; [H]=freqz(x,1,w); magH=abs(H);phaH=angle(H); subplot(2,2,1);plot(w/pi,magH);grid xlabel('');ylabel('|x|');title(’DTFT的幅度’) subplot(2,2,2);plot(w/pi,phaH/pi*180);grid xlabel(’以pi为单位的频率');ylabel(’度’);title(’DTFT的相角’) N=8;w1=2*pi/N;k=0:N-1; X=dft(x,N); magX=abs(X),phaX=angle(X)*180/pi subplot(2,2,3);plot(w*N/(2*pi),magH,'—-'); axis([-0。1,8。1,0,20]); hold on stem(k,magX); ylabel('|x(k)|’);title(’DFT的幅度:N=8');text(4。3,-1,’k') hold off subplot(2,2,4);plot(w*N/(2*pi),phaH*180/pi,’-—'); axis([—0.1,8。1,—200,200]); hold on stem(k,phaX); ylabel(’度’);title(’DFT的相角:N=8');text(4.3,-200,’k') 7-—2 clear; clc; x=[2,2,2,2,2,2,2,2];w=[0:1:500]*2*pi/500; [H]=freqz(x,1,w); magH=abs(H);phaH=angle(H); subplot(2,2,1);plot(w/pi,magH);grid xlabel('’);ylabel('|x|');title(’DTFT的幅度') subplot(2,2,2);plot(w/pi,phaH/pi*180);grid xlabel('以pi为单位的频率’);ylabel('度');title('DTFT的相角’) N=16;w1=2*pi/N;k=0:N-1; X=fft(x,N); magX=abs(X),phaX=angle(X)*180/pi subplot(2,2,3);plot(w*N/(2*pi),magH,'—-’); axis([—0.1,16.1,0,20]); hold on stem(k,magX); ylabel('|x(k)|');title('DFT的幅度:N=16');text(4。3,—1,’k’) hold off subplot(2,2,4);plot(w*N/(2*pi),phaH*180/pi,'-—’); axis([—0。1,16。1,-200,200]); hold on stem(k,phaX,’.’); ylabel('度’);title(’DFT的相角:N=16');text(4。3,-250,’k’) 8--1 N=12;w1=2*pi/N;k=0:N—1; x=[1,2,3,4,5,6,6,5,4,3,2,1]; X=dft(x,N); magX=abs(X),phaX=angle(X)*180/pi subplot(2,1,1); axis([-0。1,12。1,0,50]); hold on stem(k,magX); ylabel(’|x(k)|');title('DFT的幅度:N=12'); hold off subplot(2,1,2); axis([—0.1,12。1,—400,400]); hold on stem(k,phaX); ylabel(’度');title(’DFT的相角:N=12'); 8-—2 x=[1,2,3,4,5,6,6,5,4,3,2,1];w=[0:1:500]*2*pi/500; [H]=freqz(x,1,w); magH=abs(H);phaH=angle(H); subplot(2,2,1);plot(w/pi,magH);grid axis([0,2,0,50]); xlabel(’');ylabel('|x|’);title(’DTFT的幅度’) subplot(2,2,2);plot(w/pi,phaH/pi*180);grid axis([0,2,—400,400]); xlabel('以pi为单位的频率’);ylabel('度’);title(’DTFT的相角’) N=12;w1=2*pi/N;k=0:N-1; x=[1,2,3,4,5,6,6,5,4,3,2,1]; X=dft(x,N); magX=abs(X),phaX=angle(X)*180/pi subplot(2,2,3);plot(w*N/(2*pi),magH,’--’); axis([—0。1,12.1,0,50]); hold on stem(k,magX); ylabel(’|x(k)|');title('DFT的幅度:N=12'); hold off subplot(2,2,4);plot(w*N/(2*pi),phaH*180/pi,'--'); axis([—0.1,12.1,—400,400]); hold on stem(k,phaX); ylabel('度');title('DFT的相角:N=12'); 9 clear; clc; N1=40; n=0:1:N1-1; t=0.01*n; x=2*sin(4*pi*t)+5*cos(16*pi*t); x1=fft(x); magx1=abs(x1); w=2*pi/N1*n; subplot(3,1,1); plot((w*100)/(2*pi),magx1);title('DFT幅度'); axis([0,25,0,200]); N2=60; n=0:1:N2—1; t=0。01*n; x=2*sin(4*pi*t)+5*cos(16*pi*t); x2=fft(x); magx2=abs(x2); w=2*pi/N2*n; subplot(3,1,2); plot((w*100)/(2*pi),magx2);title(’DFT幅度'); axis([0,25,0,200]); N3=128; n=0:1:N3—1; t=0。01*n; x=2*sin(4*pi*t)+5*cos(16*pi*t); x3=fft(x); magx3=abs(x3); w=2*pi/N3*n; subplot(3,1,3); plot((w*100)/(2*pi),magx3);title(’DFT幅度’); axis([0,25,0,400]); 10 clear; clc; N=128; n=0:1:N-1; t=0。01*n; x=2*sin(4*pi*t)+5*cos(16*pi*t); y=x+0。8*randn(1,length(t)); x1=fft(x); magx1=abs(x1); w=2*pi/N*n; subplot(2,1,1); plot((w*100)/(2*pi),magx1);title(’DFT幅度'); axis([0,40,0,400]); y1=fft(y); magy1=abs(y1); w=2*pi/N*n; subplot(2,1,2);plot((w*100)/(2*pi),magy1);title(’被噪声污染后DFT幅度’) axis([0,100,0,400]); 11 clear; clc; N=512;n=0:N-1;t=0.01*n; x=sin(2*pi*5*t)+sin(2*pi*15*t)+sin(2*pi*30*t); X=fft(x,N); magx=abs(X); k=[0:1:N—1];w=2*pi/N*k; plot(k/N*100,magx); title(’FFT N=512’) xlabel(’频率(单位:Hz)’); ylabel('|X|’);grid axis([0,100,0,300]) 12 clear all clc N1=128; n1=0:N1—1; t1=0.01*n1; x1=0。5*sin(2*pi*15*t1)+2*sin(2*pi*40*t1); k1=0:1:127; w1=2*pi/N1*k1; X1=fft(x1); magX1=abs(X1); subplot(2,1,1); plot((w1*100)/(2*pi),magX1); axis([0,50,0,150]); title(’DFT N=128’); xlabel(’频率(单位:pi)’); ylabel('X(k)’); grid; N2=1024; n2=0:N2—1; t2=0。01*n2; x2=0.5*sin(2*pi*15*t2)+2*sin(2*pi*40*t2); k2=0:1:1023; w2=2*pi/N2*k2; X2=fft(x2); magX2=abs(X2); subplot(2,1,2); plot((w2*100)/(2*pi),magX2); axis([0,50,0,900]); title(’DFT N=1024'); xlabel(’频率(单位:pi)’); ylabel(’X(k)'); grid; 13 t=0:0.001:1; x=sin(2*pi*60*t)+sin(2*pi*200*t); subplot(2,1,1);stem(t,x,'。’); title(’signial x(n)’);grid; y=x+1.5*randn(1,length(t)); Y=fft(y,1024); p=Y。*conj(Y)/1024; N=1:1024;n=N/1000*1024; subplot(2,1,2);plot(n,p); axis([0,600,0,280]); title(’signial y(n)');grid; xlabel('频率(单位:Hz)’); ylabel('p’);grid 14 n=[0:1:9]; x=cos(0。48*pi*n)+cos(0。52*pi*n); X=fft(x); magx=abs(X(1:1:10)); k=0:1:9; w=2*pi/10*k; subplot(3,1,1); stem(w/pi,magx); title(’N=10点DFT幅度’); xlabel('频率(单位:pi)'); axis([0,1,0,10]); n=[0:1:9]; y=cos(0。48*pi*n)+cos(0.52*pi*n); n1=[0:1:99]; x=[y(1:1:10) zeros(1,90)]; x1=fft(x); magx1=abs(x1(1:1:50)); k1=0:1:49; w1=2*pi/100*k1; subplot(3,1,2); stem(w1/pi,magx1); title(’补零到一百点DFT幅度’); xlabel(’频率(单位:pi)’); axis([0,1,0,10]); n=[0:1:99]; x=cos(0。48*pi*n)+cos(0.52*pi*n); X=fft(x); magx=abs(X(1:1:50)); k=0:1:49; w=2*pi/100*k; subplot(3,1,3); stem(w/pi,magx); title(’N=100点DFT幅度’); xlabel('频率(单位:pi)'); axis([0,1,0,60]); 15 n=0:10; x=10*(0。8.^n); x1=fft(x); k=0:10; y1=x1.*(exp(8*j*pi*k/11)); y=ifft(y1); subplot(2,2,1); stem(n,x); title('原序列x(n)’); xlabel(’n’); axis([0,10,0,12]); subplot(2,2,2); stem(n,y); title(’移位序列y(n)'); axis([0,10,0,12]); n=0:10; y=10*(0.8。^n); x=[y(1:1:11) zeros(1,4)]; n1=0:14; subplot(2,2,3); stem(n1,x); title('15点序列x(n)’); xlabel('n’); axis([0,14,0,12]); x1=fft(x); k=0:14; y1=x1。*(exp(8*j*pi*k/15)); y=ifft(y1); subplot(2,2,4); stem(n1,y); title('15点移位序列y(n)'); axis([0,14,0,12]); 16 clc; N=31; n=[0:N]; x=n.*(stepseq(0,0,N)-stepseq(16,0,N)); y=stepseq(0,0,N)-stepseq(8,0,N); X=fft(x); Y=fft(y); Z=X.*Y; z=ifft(Z); subplot(3,1,1); stem(n,z); title(’线性卷积’); axis([0,25,0,100]); N1=15; n1=[0:31]; x1=n1。*(stepseq(0,0,31)-stepseq(16,0,31)); y1=stepseq(0,0,N1)-stepseq(8,0,N1); X1=fft(x1,16); Y1=fft(y1); Z1=X1。*Y1; z1=ifft(Z1); subplot(3,1,2); n1=[0:15]; stem(n1,z1); title(’16点圆周卷积’); axis([0,20,0,100]); N=31; n=[0:N]; x=n。*(stepseq(0,0,N)-stepseq(16,0,N)); y=stepseq(0,0,31)—stepseq(8,0,31); X=fft(x); Y=fft(y); Z=X.*Y; z=ifft(Z); subplot(3,1,3); stem(n,z); title(’32点圆周卷积'); axis([0,25,0,100]); 17 Rp=0。5; T=0.001; ws=200*2*pi*T; ws1=(2/T)*tan(ws/2); [b,a]=cheby1(9,Rp,ws1,'high','s’); [bz,az]=bilinear(b,a,1/T); [db,mag,pha,grd,w]=freqz_m(bz,az); subplot(2,1,1); plot(w/pi,db); grid; axis([0,1,-400,100]); title(’系统的幅频响应'); subplot(2,1,2); plot(w/pi,pha); title('系统的相频响应'); 18 Wn=2*pi*100; fs=1000; [b,a]=butter(6,Wn,'s'); [bz,az]=impinvar(b,a,fs); [db,mag,pha,grd,w]=freqz_m(bz,az); subplot(2,2,1); plot(w/pi,db); title(’系统的幅频响应’); axis([0,1,-50,5]); subplot(2,2,2); plot(w/pi,pha); title(’系统的相频响应'); %Filter x=[—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]; y=filter(bz,az,x); N=56; n=0:N-1; subplot(2,2,3); plot(n,x); title(’输入波形'); subplot(2,2,4); plot(n,y); title(’输出波形'); 19 %最高f=30Hz,可取fs=100Hz,即t=0。01n %s(n)=sin(0。1*pi*n)+sin(0.3*pi*n)+sin(0。6*pi*n); %s(n)的样本取301点 %注意:这不是双线性变换法,是完全设计法,不过,效果一样。参考P Rp=0。1; Rs=40; wp1=0。2*pi; wp2=0。4*pi; wn=[wp1,wp2]/pi; n=4; [b,a]=ellip(n,Rp,Rs,wn);%默认时表带通 [db,mag,pha,grd,w]=freqz_m(b,a); subplot(3,1,1); plot(w/pi,db); axis([0,1,—100,5]); n=0:300; s=sin(0。1*pi*n)+sin(0.3*pi*n)+sin(0。6*pi*n); subplot(312); plot(n,s) hold on y=filter(b,a,s); subplot(313); plot(n,y) 20 %可抽象成一低通或带阻滤波器。抽象成低通来设计 %抽样频率取fs=1000Hz; %验证看指标 fp=100; fs=130; Rp=2; Rs=50; T=0.001; wp=2*pi*fp*T; ws=2*pi*fs*T; wp1=(2/T)*tan(wp/2); ws1=(2/T)*tan(ws/2); [n,wn]=cheb1ord(wp1,ws1,Rp,Rs,'s’); [b,a]=cheby1(n,Rp,wn,’low','s'); [bz,az]=bilinear(b,a,1/T); [db,mag,pha,grd,w]=freqz_m(bz,az); grid on plot(w/pi,db); axis([0,1,-80,5]); 21 b=[1,1];a=[1,5,6];T=1; [bz,az]=impinvar(b,a,1/T) [bz1,az1]=bilinear(b,a,1/T) 22 Rp=2;Rs=30;T=0。001; wp1=2*pi*100*T;wp2=2*pi*250*T;ws1=2*pi*50*T;ws2=2*pi*300*T; wp3=(2/T)*tan(wp1/2);wp4=(2/T)*tan(wp2/2); ws3=(2/T)*tan(ws1/2);ws4=(2/T)*tan(ws2/2); wp=[wp3,wp4];ws=[ws3,ws4]; [n,wn]=cheb1ord(wp,ws,Rp,Rs,'s');[z,p,k]=cheb1ap(n,Rp);[b,a]=zp2tf(z,p,k); w0=sqrt(wp3*wp4);Bw=wp4—wp3; [b1,a1]=lp2bp(b,a,w0,Bw); [bz,az]=bilinear(b1,a1,1/T); [db,mag,pha,grd,w]=freqz_m(bz,az);plot(w/pi/T/2,db);axis([0,400,—50,2]); 23 clc; close all; clear all; Rp=3; Rs=18; fs=2000; ws1=0.2*pi; wp1=0.3*pi; wp2=0.4*pi; ws2=0.5*pi; wp3=(2*fs)*tan(wp1/2); wp4=(2*fs)*tan(wp2/2); ws3=(2*fs)*tan(ws1/2); ws4=(2*fs)*tan(ws2/2); wp=[wp3,wp4]; ws=[ws3,ws4]; [n,wn]=buttord(wp,ws,Rp,Rs,’s'); [b,a]=butter(n,wn,'bandpass','s’); [bz,az]=bilinear(b,a,fs); [db,mag,pha,grd,w]=freqz_m(bz,az); plot((w*2000)/(2*pi),db); grid; 24 clc;close all;clear all; Rp=1;Rs=15;fs=2000; wp1=0.2*pi;ws1=0。3*pi; wp2=(2*fs)*tan(wp1/2); ws2=(2*fs)*tan(ws1/2); [n,wn]=cheb1ord(wp2,ws2,Rp,Rs,'s’); [b,a]=cheby1(n,Rp,wn,’s’); [bz,az]=bilinear(b,a,fs); [db,mag,pha,grd,w]=freqz_m(bz,az);plot(w/pi,db); 25 Rp=1;Rs=25;wp1=0.2*pi;ws1=0。4*pi;T=0。001; wp=(2/T)*tan(wp1/2);ws=(2/T)*tan(ws1/2); [n,wn]=cheb2ord(wp,ws,Rp,Rs,'s') %从此处可以计算阶数n [b,a]=cheby2(n,Rs,wn,'low’,’s') %由b,a的值可以得到系统函数 [bz,az]=bilinear(b,a,1/T); [b0,B,A]=dir2cas(bz,az) [db,mag,pha,grd,w]=freqz_m(bz,az); subplot(2,1,1);plot(w/pi,db); axis([0,1,—65,10]); xlabel(''); ylabel(''); title(’幅频相应') subplot(2,1,2); plot(w/pi,pha); xlabel('频率(单位:pi)’); ylabel(’相位’);title(’相频相应'); 26 Rp=1; Rs=15; wp1=0。2*pi; ws1=0.3*pi; T=0。001; wp=(2/T)*tan(wp1/2); ws=(2/T)*tan(ws1/2); [n,wn]=ellipord(wp,ws,Rp,Rs,’s') %从此处可以计算阶数n [b,a]=ellip(n,Rp,Rs,wn,'low','s') %由b,a的值可以得到系统函数 [bz,az]=bilinear(b,a,1/T); [b0,B,A]=dir2cas(bz,az) [db,mag,pha,grd,w]=freqz_m(bz,az); subplot(2,1,1); plot(w/pi,db); axis([0,1,-65,10]); xlabel('’); ylabel(’幅频’); title('幅频相应(相对幅度)') subplot(2,1,2); plot(w/pi,pha); xlabel(’频率(单位:pi)'); ylabel(’相位'); title('相频相应’) 27 Rp=1.5; Rs=20; T=0。001; wp=0.4*pi; ws=0.6*pi; wp1=(2/T)*tan(wp/2); ws1=(2/T)*tan(ws/2); [n,wn]=buttord(wp1,ws1,Rp,Rs,’s’) [b,a]=butter(n,wn,’s') [bz,az]=bilinear(b,a,1/T); [b0,B,A]=dir2par(bz,az) [db,mag,pha,grd,w]=freqz_m(bz,az); subplot(2,1,1); plot(w/pi,db); axis([0,1,-200,5]); grid subplot(2,1,2); plot(w/pi,pha/pi); axis([0,1,-1.2,1.2]); grid 28 Rp=1;Rs=15;T=0。001; wp=0。6*pi;ws=0。4*pi; wp1=(2/T)*tan(wp/2);ws1=(2/T)*tan(ws/2); [n,wn]=cheb1ord(wp1,ws1,Rp,Rs,’s') [b,a]=cheby1(n,Rp,wn,’high',’s') [bz,az]=bilinear(b,a,1/T); [b0,B,A]=dir2par(b,a) [db,mag,pha,grd,w]=freqz_m(bz,az); subplot(2,1,1);plot(w/pi,db);axis([0,1,—300,5]);grid subplot(2,1,2);plot(w/pi,pha/pi);axis([0,1,-1。2,1.2]);grid 29 clc; close all; clear all; Rp=1;Rs=40;fs=1000; ws1=0。25*pi;ws2=0.8*pi; wp1=0.4*pi;wp2=0.7*pi; wp3=(2*fs)*tan(wp1/2); wp4=(2*fs)*tan(wp2/2); ws3=(2*fs)*tan(ws1/2); ws4=(2*fs)*tan(ws2/2); wp=[wp3,wp4]; ws=[ws3,ws4]; [n,wn]=cheb2ord(wp,ws,Rp,Rs,'s') [b,a]=cheby2(n,Rs,wn,'bandpass',’s'); [bz,az]=bilinear(b,a,fs); [db,mag,pha,grd,w]=freqz_m(bz,az); subplot(2,1,1);plot(w/pi,db);axis([0,1,—100,10]); subplot(2,1,2);plot(w/pi,pha); 30 Rp=1;Rs=60;wp1=0。4*pi;ws1=0.5*pi;T=0.001; wp=(2/T)*tan(wp1/2);ws=(2/T)*tan(ws1/2); [n,wn]=ellipord(wp,ws,Rp,Rs,’s’) ; [b,a]=ellip(n,Rp,Rs,wn,'low','s’) ; [bz,az]=bilinear(b,a,1/T); [db,mag,pha,grd,w]=freqz_m(bz,az); subplot(3,1,1);plot(w/pi,db); axis([0,1,-100,5]); xlabel('');ylabel('相对幅度'); title('幅频相应(相对幅度)') subplot(3,1,3); plot(w/pi,pha);xlabel(’频率(单位:pi)’);ylabel(’相位');title(’相频相应') 31 Rp=1;Rs=50;ws1=0.4*pi;ws2=0.48*pi;fs=1000; ws3=(2*fs)*tan(ws1/2);ws4=(2*fs)*tan(ws2/2); n=10; [z,p,k]=ellipap(n,Rp,Rs);[b,a]=zp2tf(z,p,k); w0=sqrt(ws3*ws4);bw=ws4-ws3; [b1,a1]=lp2bs(b,a,w0,bw); [bz,az]=bilinear(b1,a1,fs); [db,mag,pha,grd,w]=freqz_m(bz,az); subplot(3,1,1); plot(w/pi,db); axis([0,1,—100,2]); n=0:200; x=sin(0。44*pi*n); subplot(3,1,2); plot(n,x);hold on subplot(3,1,3); y=filter(bz,az,x); plot(n,y); 32 clc; clear all; Rp=0.5;Rs=60;T=1/200; wp1=60*2*pi*T;wp2=80*2*pi*T;ws1=55*2*pi*T;ws2=85*2*pi*T; wp3=(2/T)*tan(wp1/2);wp4=(2/T)*tan(wp2/2); ws3=(2/T)*tan(ws1/2);ws4=(2/T)*tan(ws2/2); wp=[wp3,wp4];ws=[ws3,ws4]; [n,wn]=cheb2ord(wp,ws,Rp,Rs,’s'); [b,a]=cheby2(n,Rs,wn,'bandpass','s'); [bz,az]=bilinear(b,a,1/T); [db,mag,pha,grd,w]=freqz_m(bz,az);plot((w*200)/(2*pi),db);axis([0,120,-100,2]); 33 Rp=0.8;Rs=25;T=0。001;fp=300;fs=200; wp=2*pi*fp*T;ws=2*pi*fs*T; wp1=(2/T)*tan(wp/2);ws1=(2/T)*tan(ws/2); [n,wn]=buttord(wp1,ws1,Rp,Rs,'
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服