東南大學(xué)信號與系統(tǒng)MATLAB實踐第三次作業(yè).doc
《東南大學(xué)信號與系統(tǒng)MATLAB實踐第三次作業(yè).doc》由會員分享,可在線閱讀,更多相關(guān)《東南大學(xué)信號與系統(tǒng)MATLAB實踐第三次作業(yè).doc(21頁珍藏版)》請在裝配圖網(wǎng)上搜索。
練習(xí)三 實驗三 五. 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. %沖激響應(yīng) >> clear; b=[1,3]; a=[1,3,2]; sys=tf(b,a); impulse(sys); 結(jié)果: %求零輸入響應(yīng) >> 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. %沖激響應(yīng) >> clear; b=[1,3]; a=[1,2,2]; sys=tf(b,a); impulse(sys) %求零輸入響應(yīng) >> 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. %沖激響應(yīng) >> clear; b=[1,3]; a=[1,2,1]; sys=tf(b,a); impulse(sys) %求零輸入響應(yīng) >> 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('沖擊響應(yīng)'); subplot(2,1,2); step(sys);title('階躍響應(yīng)'); 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('響應(yīng)信號'); 三. 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);- 1.請仔細(xì)閱讀文檔,確保文檔完整性,對于不預(yù)覽、不比對內(nèi)容而直接下載帶來的問題本站不予受理。
- 2.下載的文檔,不會出現(xiàn)我們的網(wǎng)址水印。
- 3、該文檔所得收入(下載+內(nèi)容+預(yù)覽)歸上傳者、原創(chuàng)作者;如果您是本文檔原作者,請點此認(rèn)領(lǐng)!既往收益都?xì)w您。
下載文檔到電腦,查找使用更方便
32 積分
下載 |
- 配套講稿:
如PPT文件的首頁顯示word圖標(biāo),表示該PPT已包含配套word講稿。雙擊word圖標(biāo)可打開word文檔。
- 特殊限制:
部分文檔作品中含有的國旗、國徽等圖片,僅作為作品整體效果示例展示,禁止商用。設(shè)計者僅對作品中獨創(chuàng)性部分享有著作權(quán)。
- 關(guān) 鍵 詞:
- 東南大學(xué) 信號 系統(tǒng) MATLAB 實踐 第三次 作業(yè)
鏈接地址:http://m.appdesigncorp.com/p-1545834.html