东南大学信号与系统MATLAB实践第三次作业.doc
《东南大学信号与系统MATLAB实践第三次作业.doc》由会员分享,可在线阅读,更多相关《东南大学信号与系统MATLAB实践第三次作业.doc(21页珍藏版)》请在装配图网上搜索。
练习三 实验三 五. 1. >>help window WINDOW 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 window 2. >>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=A\B Q = 4 -1 >> clear B=[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 0 b = 1 0 c = 1 3 d = 0 2. %冲激响应 >> clear; b=[1,3]; a=[1,2,2]; sys=tf(b,a); impulse(sys) %求零输入响应 >> A=[1,3;1,-2]; B=[1;2]; Q=A\B Q = 1.6000 -0.2000 >> clear B=[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 0 b = 1 0 c = 1 3 d = 0 3. %冲激响应 >> clear; b=[1,3]; a=[1,2,1]; sys=tf(b,a); impulse(sys) %求零输入响应 >> A=[1,3;1,-1]; B=[1;2]; Q=A\B Q = 1.7500 -0.2500 >> clear B=[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 0 b = 1 0 c = 1 3 d = 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);- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 东南大学 信号 系统 MATLAB 实践 第三次 作业

链接地址:https://www.zhuangpeitu.com/p-1545834.html