东南大学信号与系统MATLAB实践第三次作业.doc

上传人:最*** 文档编号:1545834 上传时间:2019-10-25 格式:DOC 页数:21 大小:116.50KB
返回 下载 相关 举报
东南大学信号与系统MATLAB实践第三次作业.doc_第1页
第1页 / 共21页
东南大学信号与系统MATLAB实践第三次作业.doc_第2页
第2页 / 共21页
东南大学信号与系统MATLAB实践第三次作业.doc_第3页
第3页 / 共21页
点击查看更多>>
资源描述
练习三实验三五1help windowWINDOW Window function gateway. WINDOW(WNAME,N) returns an N-point window of type specified by the function handle WNAME in a column vector. WNAME can be any valid window function name, for example: bartlett - Bartlett window. barthannwin - Modified Bartlett-Hanning window. blackman - Blackman window. blackmanharris - Minimum 4-term Blackman-Harris window. bohmanwin - Bohman window. chebwin - Chebyshev window. flattopwin - Flat Top window. gausswin - Gaussian window. hamming - Hamming window. hann - Hann window. kaiser - Kaiser window. nuttallwin - Nuttall defined minimum 4-term Blackman-Harris window. parzenwin - Parzen (de la Valle-Poussin) window. rectwin - Rectangular window. tukeywin - Tukey window. triang - Triangular window. WINDOW(WNAME,N,OPT) designs the window with the optional input argument specified in OPT. To see what the optional input arguments are, see the help for the individual windows, for example, KAISER or CHEBWIN. WINDOW launches the Window Design & Analysis Tool (WinTool). EXAMPLE: N = 65; w = window(blackmanharris,N); w1 = window(hamming,N); w2 = window(gausswin,N,2.5); plot(1:N,w,w1,w2); axis(1 N 0 1); legend(Blackman-Harris,Hamming,Gaussian); See also bartlett, barthannwin, blackman, blackmanharris, bohmanwin, chebwin, gausswin, hamming, hann, kaiser, nuttallwin, parzenwin, rectwin, triang, tukeywin, wintool. Overloaded functions or methods (ones with the same name in other directories) help fdesign/window.m Reference page in Help browser doc window2.N = 128;w = window(rectwin,N);w1 = window(bartlett,N);w2 = window(hamming,N);plot(1:N,w,w1,w2); axis(1 N 0 1);legend(矩形窗,Bartlett,Hamming);3.wvtool(w,w1,w2)六ts=0.01;N=20;t=0:ts:(N-1)*ts;x=2*sin(4*pi*t)+5*cos(6*pi*t);g=fft(x,N);y=abs(g)/100;figure(1):plot(0:2*pi/N:2*pi*(N-1)/N,y);grid;ts=0.01;N=30;t=0:ts:(N-1)*ts;x=2*sin(4*pi*t)+5*cos(6*pi*t);g=fft(x,N);y=abs(g)/100;figure(2):plot(0:2*pi/N:2*pi*(N-1)/N,y);grid;ts=0.01;N=50;t=0:ts:(N-1)*ts;x=2*sin(4*pi*t)+5*cos(6*pi*t);g=fft(x,N);y=abs(g)/100;figure(3):plot(0:2*pi/N:2*pi*(N-1)/N,y);grid;ts=0.01;N=100;t=0:ts:(N-1)*ts;x=2*sin(4*pi*t)+5*cos(6*pi*t);g=fft(x,N);y=abs(g)/100;figure(4):plot(0:2*pi/N:2*pi*(N-1)/N,y);grid;ts=0.01;N=150;t=0:ts:(N-1)*ts;x=2*sin(4*pi*t)+5*cos(6*pi*t);g=fft(x,N);y=abs(g)/100;figure(5):plot(0:2*pi/N:2*pi*(N-1)/N,y);grid;实验八1%冲激响应 clear;b=1,3;a=1,3,2;sys=tf(b,a);impulse(sys);结果:%求零输入响应 A=1,3;0,-2;B=1;2;Q=ABQ = 4-1 clearB=1,3;A=1,3,2;a,b,c,d=tf2ss(B,A)sys=ss(a,b,c,d);x0=4;-1;initial(sys,x0);grid;a = -3 -2 1 0b = 1 0c = 1 3d = 02.%冲激响应 clear;b=1,3;a=1,2,2;sys=tf(b,a);impulse(sys)%求零输入响应 A=1,3;1,-2;B=1;2;Q=ABQ = 1.6000 -0.2000 clearB=1,3;A=1,2,2;a,b,c,d=tf2ss(B,A)sys=ss(a,b,c,d);x0=1.6;-0.2;initial(sys,x0);grid;a = -2 -2 1 0b = 1 0c = 1 3d = 03.%冲激响应 clear;b=1,3;a=1,2,1;sys=tf(b,a);impulse(sys)%求零输入响应 A=1,3;1,-1;B=1;2;Q=ABQ = 1.7500 -0.2500 clearB=1,3;A=1,2,1;a,b,c,d=tf2ss(B,A)sys=ss(a,b,c,d);x0=1.75;-0.25;initial(sys,x0);grid;a = -2 -1 1 0b = 1 0c = 1 3d = 0二 clear;b=1;a=1,1,1,0;sys=tf(b,a);subplot(2,1,1);impulse(sys);title(冲击响应);subplot(2,1,2);step(sys);title(阶跃响应);t=0:0.01:20;e=sin(t);r=lsim(sys,e,t);figure;subplot(2,1,1);plot(t,e);xlabel(Time);ylabel(A);title(激励信号);subplot(2,1,2);plot(t,r);xlabel(Time);ylabel(A);title(响应信号); 三1. clear;b=1,3;a=1,3,2;t=0:0.08:8;e=exp(-3*t);sys=tf(b,a);lsim(sys,e,t);2. clear;b=1,3;a=1,2,2;t=0:0.08:8;sys=tf(b,a);step(sys)3 clear;b=1,3;a=1,2,1;t=0:0.08:8;e=exp(-2*t);sys=tf(b,a);lsim(sys,e,t);Doc:1. clear;B=1;A=1,1,1;sys=tf(B,A,-1);n=0:200;e=5+cos(0.2*pi*n)+2*sin(0.7*pi*n);r=lsim(sys,e);stem(n,r); 2. clear;B=1,1,1;A=1,-0.5,-0.5;sys=tf(B,A,-1);e=1,zeros(1,100);n=0:100;r=lsim(sys,e);stem(n,r);
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸专区 > 课件教案


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!