《基于MATLAB的信號(hào)與系統(tǒng)實(shí)驗(yàn)指導(dǎo)》編程練習(xí)試題_第1頁(yè)
《基于MATLAB的信號(hào)與系統(tǒng)實(shí)驗(yàn)指導(dǎo)》編程練習(xí)試題_第2頁(yè)
《基于MATLAB的信號(hào)與系統(tǒng)實(shí)驗(yàn)指導(dǎo)》編程練習(xí)試題_第3頁(yè)
《基于MATLAB的信號(hào)與系統(tǒng)實(shí)驗(yàn)指導(dǎo)》編程練習(xí)試題_第4頁(yè)
《基于MATLAB的信號(hào)與系統(tǒng)實(shí)驗(yàn)指導(dǎo)》編程練習(xí)試題_第5頁(yè)
已閱讀5頁(yè),還剩35頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、專業(yè)資料2連續(xù)時(shí)間信號(hào)在MATLAB中的表示2-1.利用MATLAB命令畫出下列連續(xù)信號(hào)的波形圖(1)>> t=0:0.01:3;>> ft=2*cos(3*t+pi/4);>> plot(t,ft),grid on;>> axis(0 3 -2.2 2.2);>> title('2cos(3t+pi/4)')(2)>> t=0:0.01:3;>> ft=2-exp(-t);>> plot(t,ft),grid on;>> title('(2-exp(-t)u(t

2、)')(3)>> t=-1:0.01:1;>> ft=t.*(uCT(t)-uCT(t-1);>> plot(t,ft),grid on>> axis(-1 1 -0.2 1.2);>> title('tu(t)-u(t-1)')(4)>> t=-1:0.01:3;>> ft=(1+cos(pi*t).*(uCT(t)-uCT(t-2);>> plot(t,ft),grid on>> axis(-1 3 -0.2 2.2);>> title('

3、1+cos(pi*t)u(t)-u(t-2)')2-2.利用MATLAB命令畫出下列復(fù)信號(hào)的實(shí)部、虛部、模和輻角(1)>> t=0:0.01:3;>> ft=2+exp(i*(pi/4)*t)+exp(i*(pi/2)*t);>> subplot(2,2,1);plot(t,real(ft);title('實(shí)部');axis(0 3 0 4);grid on;>> subplot(2,2,2);plot(t,imag(ft);title('虛部');axis(0 3 0 2);grid on;>>

4、; subplot(2,2,3);plot(t,abs(ft);title('模');axis(0 3 0 4);grid on;>> subplot(2,2,4);plot(t,angle(ft);title('相角');axis(0 3 0 2);grid on;(2)t=0:0.01:3;>> ft=2*exp(i*(t+pi/4);>> subplot(2,2,1);plot(t,real(ft);title('實(shí)部');axis(0 3 0 2);grid on;>> subplot(2,

5、2,2);plot(t,imag(ft);title('虛部');axis(0 3 0 2);grid on; >> subplot(2,2,3);plot(t,abs(ft);title('模');axis(0 3 0 4);grid on;>> subplot(2,2,4);plot(t,angle(ft);title('相角');axis(0 3 0 4);grid on;2-3.利用MATLAB命令產(chǎn)生幅度為1、周期為1、占空比為0.5的一個(gè)周期矩形脈沖信號(hào)>> t=-0.5:0.01:3;>&g

6、t; ft=square(2*pi*t,50);>> plot(t,ft);grid on;axis(-0.5 3 -1.2 1.2);>> title('幅度為1、周期為1、占空比0.5的周期舉行脈沖信號(hào)')3連續(xù)時(shí)間信號(hào)在MATLAB中的運(yùn)算3-1.試用MATLAB命令繪出以下信號(hào)的波形圖(1)>> syms x t;>> t=-1:0.01:1;>> x=exp(-t).*sin(10*pi*t)+exp(-0.5*t).*sin(9*pi*t);>> plot(t,x)(2)>> sym

7、s x t;>> t=-1:0.01:1;>> x=sinc(t).*cos(10*pi*t);>> plot(t,x)3-2.已知連續(xù)時(shí)間信號(hào)f(t)的波形如圖3-6所示,試用MATLAB命令畫出下列信號(hào)的波形圖先畫出圖3-6:>> t=-2:0.01:2;>>f=(-t-1).*(-uCT(t+2)+uCT(t+1)+uCT(t+1)+uCT(t)-uCT(t-1)-(t-1).*(uCT(t-1)-uCT(t-2)-uCT(t-2);>> plot(t,f)>> axis(-4 4 -1 2)>&g

8、t; title('圖3-6')>> t=-2:0.01:2;>> f1=funct2(t-1);>> f2=funct2(2-t);>> f3=funct2(2*t+1);>> f4=funct2(4-t/2);>> f5=(funct2(t)+funct2(-t).*uCT(t);>> subplot(231);plot(t,f1);grid on;title('f(t-1)');axis(-3 3 -1 2);>> subplot(232);plot(t,f2)

9、;grid on;title('f(2-t)');axis(-3 3 -1 2);>> subplot(233);plot(t,f3);grid on;title('f(2t-1)');axis(-3 3 -1 2);>> subplot(234);plot(t,f4);grid on;title('f(4-t/2)');axis(-3 3 -1 2);>> subplot(235);plot(t,f5);grid on;title('(f(t)+f(-t)u(t)');axis(-3 3 -1

10、 2);3-3.試用MATLAB命令繪出如圖3-7所示信號(hào)的偶分量和奇分量>> t=0:0.01:2;>> f=(uCT(t)-uCT(t-2).*(-t+1);>> plot(t,f);title('圖3-7')>> f1=fliplr(f);>> fe=(f+f1)/2;fo=(f-f1)/2;>> subplot(211),plot(t,fe);grid on>> title('fe')>> subplot(212),plot(t,fo);grid on;tit

11、le('fo')4連續(xù)時(shí)間信號(hào)的卷積計(jì)算4-1用MATLAB命令繪出下列信號(hào)的卷積積分f1t*f2(t)的時(shí)域波形圖>> dt=0.001;t1=-0.5:dt:3.5;>> f1=uCT(t1)-uCT(t1-2);>> t2=t1;>> f2=uCT(t2)+uCT(t2-1)-uCT(t2-2)-uCT(t2-3);>> t,f=ctsconv(f1,f2,t1,t2,dt);6周期信號(hào)的傅里葉級(jí)數(shù)及頻譜分析6-1已知周期三角信號(hào)如圖6-5所示,試求出該信號(hào)的傅里葉級(jí)數(shù),利用MATLAB編程實(shí)現(xiàn)其各次諧波的疊加,

12、并驗(yàn)證其收斂性。6-2 試用MATLAB分析圖6-5中周期三角信號(hào)的頻譜。當(dāng)周期三角信號(hào)的周期和三角信號(hào)的寬度變化時(shí),試觀察分析其頻譜的變化。7 傅里葉變換及其性質(zhì)7-1試用MATLAB命令求下列信號(hào)的傅里葉變換,并繪出其幅度譜和相位譜。(1)f1t=sin2(t-1)(t-1) (2)f2t=sin(t)t2解:(1)ft1=sym('sin(2*pi*(t-1)/(pi*(t-1)');>> Fw1=simplify(fourier(ft1);>> subplot(211)>> ezplot(abs(Fw1),grid on>>

13、; title('幅度譜')>> phase=atan(imag(Fw1)/real(Fw1);>> subplot(212)>> ezplot(phase);grid on>> title('相位譜')(2)7-2.試用MATLAB命令求下列信號(hào)的傅里葉反變換,并繪出其時(shí)域信號(hào)圖。(1)F1w=103+wi-45+wi (2)F2w=e-4w2解:(1)>> syms t>> Fw=sym('10/(3+w*i)-4/(5+w*i)');>> ft=ifouri

14、er(Fw,t);>> ezplot(ft),grid on(2)>> syms t>> Fw2=sym('exp(-4*w2)');>> ft2=ifourier(Fw2,t) ft2 = exp(-t2/16)/(4*pi(1/2)3.試用MATLAB數(shù)值計(jì)算方法求圖7-8所示信號(hào)的傅里葉變換,并畫出其頻譜圖。解:4.已知兩個(gè)門信號(hào)的卷積為三角波信號(hào),試用MATLAB命令驗(yàn)證傅里葉變換的時(shí)域卷積定理。解:將門函數(shù)先進(jìn)行時(shí)域卷積運(yùn)算,再將卷積后的結(jié)果做傅里葉變換,程序和結(jié)果如下:dt = 0.01; 

15、;t = -2:dt:2.5;f1 = uCT(t+0.5)- uCT(t-0.5); f = conv(f1,f1)*dt;ft=sym('f'); Fw = fourier(ft) Fw =2*i*pi*dirac(1,w)  將一個(gè)門函數(shù)先進(jìn)行傅里葉變換,再將結(jié)果與自身相乘,程序和結(jié)果如下:dt = 0.01; t = -2:dt:2.5; f1 =

16、60;uCT(t+0.5)- uCT(t-0.5); ft=sym('f1'); Fw = fourier(ft); Fw=Fw*Fw Fw =-4*pi2*dirac(1,w)2 由此來(lái)驗(yàn)證傅里葉變換的時(shí)域卷積定理第8章 連續(xù)時(shí)間LTI系統(tǒng)的頻率特性及頻域分析8.1試用MATLAB命令求圖8-8所示電路系統(tǒng)的幅頻特性和相頻特性。已知R=10,L=2H,C=0.1F解:由電路知識(shí)可得,該電路系統(tǒng)的頻率響應(yīng)為H=j0.2(j)3+0.2(j)2+jMATLAB源程序:>> w=-

17、6*pi:0.01:6*pi;>> b=1 0;>> a=0.2 0.2 1 0;>> H=freqs(b,a,w);>> subplot(211)>> plot(w,abs(H),grid on>> xlabel('omega(rad/s)'),ylabel('|H(omega)|')>> title('電路系統(tǒng)的幅頻特性')>> subplot(212)>> plot(w,angle(H),grid on>> xlabel(

18、'omega(rad/s)'),ylabel('phi(omega)')>> title('電路系統(tǒng)的相頻特性')8.2已知系統(tǒng)微分方程和激勵(lì)信號(hào)如下,試用MATLAB命令求系統(tǒng)的穩(wěn)態(tài)響應(yīng)。(1)dy(t)dt+32yt=df(t)dt,ft=cos2t;(2)d2y(t)dt2+2dy(t)dt+3yt=-dftdt+2f(t),ft=3+cos2t+cos5t。解:(1)頻率響應(yīng)為H=jj+32>> t=0:0.01:20;>> H=(w*i)/(w*i+3/2);>> f=cos(2*t);&

19、gt;> y=abs(H)*cos(2*t+angle(H);>> subplot(211)>> plot(t,f),grid on>> ylabel('f(t)'),xlabel('Time(s)')>> title('激勵(lì)信號(hào)的波形')>> subplot(212)>> plot(t,y),grid on>> ylabel('y(t)'),xlabel('Time(s)')>> title('穩(wěn)態(tài)響應(yīng)的

20、波形')(2)頻率響應(yīng)為H=-j+2(j)2+2j+3MATLAB源程序:>> t=0:0.01:20;>> w1=2;w2=5;>> H1=(-i*w1+2)./(i*w1)2+2*i*w1+3);>> H2=(-i*w2+2)./(i*w2)2+2*i*w2+3);>> f=3+cos(2*t)+cos(5*t);>> y=3+abs(H1)*cos(w1*t+angle(H1)+abs(H2)*cos(w2*t+angle(H2);>> subplot(211);>> plot(t,f

21、);grid on>> ylabel('f(t)'),xlabel('Time(s)')>> title('激勵(lì)信號(hào)的波形')>> subplot(212);>> plot(t,y),grid on>> ylabel('y(t)'),xlabel('Time(s)')>> title('穩(wěn)態(tài)響應(yīng)的波形')第9章 信號(hào)抽樣及抽樣定理9.1設(shè)有三個(gè)不同頻率的正弦信號(hào),頻率分別為f1=100Hz,f2=200Hz,f3=3800Hz。

22、現(xiàn)在用抽樣頻率fs=4000Hz對(duì)這三個(gè)正弦信號(hào)進(jìn)行抽樣,用MATLAB命令畫出各抽樣信號(hào)的波形及其頻譜,并分析其頻率混疊現(xiàn)象。解:>> Ts=0.00025;>> dt=0.0001;>> t1=-0.1:dt:0.1;>> ft=sin(200*pi*t1);>> subplot(221)>> plot(t1,ft),grid on>> axis(-0.01 0.01 -1.1 1.1)>> xlabel('Time(sec)'),ylabel('f(t)')&g

23、t;> title('f1信號(hào)')>> N=100;>> k=-N:N;>> W=pi*k/(N*dt);>> Fw=ft*exp(-i*t1'*W)*dt;>> subplot(222)>> plot(W,abs(Fw),grid on>> axis(-5000 5000 -0.1 0.2)>> t2=-0.1:Ts:0.1;>> fst=sin(200*pi*t2);>> subplot(223)>> plot(t1,ft,

24、9;:'),hold on>> stem(t2,fst),grid on>> axis(-0.01 0.01 -1.1 1.1)>> xlabel('Time(sec)'),ylabel('fs(t)')>> title('抽樣后的信號(hào)'),hold off>> Fsw=fst*exp(-i*t2'*W)*Ts;>> subplot(224)>> plot(W,abs(Fsw),grid on>> axis(-5000 5000 -0.

25、1 0.2)>> xlabel('omega'),ylabel('Fs(w)')>> title('抽樣信號(hào)的頻譜')9.2結(jié)合抽樣定理,用MATLAB編程實(shí)現(xiàn)Sa(t)信號(hào)經(jīng)沖激脈沖抽樣后得到的抽樣信號(hào)fs(t)及其頻譜,并利用fs(t)重構(gòu)Sa(t)信號(hào)。解:首先,畫出Sa(t)信號(hào)的波形和頻譜:>> syms t;>> Sa(t)=(sin(t)/t;>> subplot(211)>> ezplot(Sa(t),grid on>> xlabel('T

26、ime(sec)'),ylabel('Sa(t)')>> title('Sa(t)的波形')>> Fw=simplify(fourier(Sa(t);>> subplot(212)>> ezplot(abs(Sa(t),grid on>> xlabel('omega'),ylabel('H(jw)')>> title('Sa(t)的頻譜')由圖可知,Sa(t)的頻譜大部分集中在0,6之間,設(shè)其截止頻率為wm=6,因而奈奎斯特間隔Ts=1

27、2fm=6,采用截止頻率wc=1.2×wm的低通濾波器對(duì)抽樣信號(hào)濾波后重建信號(hào)f(t),并計(jì)算重建信號(hào)與原Sa(t)信號(hào)的絕對(duì)誤差:>> wm=6;>> wc=1.2*wm;>> Ts=0.4;>> n=-100:100;>> nTs=n*Ts;>> fs=sinc(nTs/pi);>> t=-6:0.1:6;>> ft=Ts*wc/pi*fs*sinc(wc/pi)*(ones(length(nTs),1)*t-nTs'*ones(1,length(t);>> t1=

28、-6:0.1:6;>> f1=sinc(t1/pi);>> subplot(311)>> plot(t1,f1,':'),hold on>> stem(nTs,fs),grid on>> axis(-6 6 -0.5 1)>> xlabel('nTs'),ylabel('f(nTs)');>> title('抽樣間隔Ts=0.4時(shí)的抽樣信號(hào)f(nTs)')>> hold off>> subplot(312)>>

29、plot(t,ft),grid on>> axis(-6 6 -0.5 1)>> xlabel('t'),ylabel('f(t)');>> title('由f(nTs)信號(hào)重建得到Sa(t)信號(hào)')>> error=abs(ft-f1);>> subplot(313)>> plot(t,error),grid on>> xlabel('t'),ylabel('error(t)');>> title('重建信號(hào)與

30、原信號(hào)的絕對(duì)誤差')第10章 拉普拉斯變換10.1試用MATLAB命令求下列函數(shù)的拉普拉斯變換。(1)te-3t(2)(1+3t+5t2)e-2t解:(1)>> f=sym('t*exp(-3*t)');>> L=laplace(f) L = 1/(s + 3)2(2)>> f=sym('(1+3*t+5*t2)*exp(-2*t)');>> L=laplace(f) L = 1/(s + 2) + 3/(s + 2)2 + 10/(s + 2)310.2試用MATLAB命令求下列函數(shù)的拉普拉斯反變換。(1

31、)12s+3(2)3(s+5)(s+2)(3)3s(s+5)(s+2)(4)1s2(s2+2s+2)解:(1)>> F=sym('1/(2*s+3)');>> f=ilaplace(F) f = exp(-(3*t)/2)/2(2)>> F=sym('3/(s+5)*(s+2)');>> f=ilaplace(F) f = exp(-2*t) - exp(-5*t)(3)>> F=sym('3*s/(s+5)*(s+2)');>> f=ilaplace(F) f = 5*ex

32、p(-5*t) - 2*exp(-2*t)(4)>> F=sym('1/(s2*(s2+2*s+2)');>> f=ilaplace(F) f = t/2 + (exp(-t)*cos(t)/2 - 1/210.3已知某線性時(shí)不變系統(tǒng)的系統(tǒng)函數(shù)為Hs=4s2+4s+4s3+3s2+2s利用MATLAB的拉普拉斯變換法求系統(tǒng)的單位階躍響應(yīng)。解:輸入信號(hào)xt=u(t)的拉普拉斯變換為Xs=1s,故Ys=Hs*Xs=4s2+4s+4s4+3s3+2s2>> F=sym('(4*s2+4*s+4)/(s4+3*s3+2*s2)');&

33、gt;> f=ilaplace(F) f = 2*t + 4*exp(-t) - 3*exp(-2*t) - 1所以單位階躍響應(yīng)為yt=(2t+4e-t-3e-2t-1)u(t).第11章 連續(xù)時(shí)間LTI系統(tǒng)的零極點(diǎn)分析11.1試用MATLAB命令畫出下列系統(tǒng)函數(shù)的零極點(diǎn)分布圖,并判斷其穩(wěn)定性。(1)Hs=s(s+2)s2+8(2)Hs=s(s-2)s2+8(3)Hs=s2s2+4s+8(4)Hs=s2s2-4s+8(5)Hs=ss3-4s2+8s解:(1)>> b=1 2 0;>> a=1 0 8;>> sys=tf(b,a)>> pzm

34、ap(sys)因?yàn)闃O點(diǎn)在虛軸上,所以系統(tǒng)臨界穩(wěn)定。(2)>> b=1 -2 0;>> a=1 0 8;>> sys=tf(b,a);>> pzmap(sys)系統(tǒng)臨界穩(wěn)定。(3)>> b=1 0 0;>> a=1 4 8;>> sys=tf(b,a);>> pzmap(sys)系統(tǒng)穩(wěn)定。(4)>> b=1 0 0;>> a=1 -4 8;>> sys=tf(b,a);>> pzmap(sys)系統(tǒng)不穩(wěn)定。(5)>> b=1 0;>&g

35、t; a=1 -4 8 0;>> sys=tf(b,a);>> pzmap(sys)系統(tǒng)不穩(wěn)定。11.2試用MATLAB命令實(shí)現(xiàn)下列含有二階極點(diǎn)的系統(tǒng)函數(shù)所對(duì)應(yīng)的時(shí)域沖擊響應(yīng)的波形,并分析系統(tǒng)函數(shù)對(duì)時(shí)域波形的影響。(1)H1(s)=1s2(2)H2s=1(s+1)2(3)H3(s)=14s(s2+49)2解:(1)>> b1=1;>> a1=1 0 0;>> sys1=tf(b1,a1);>> subplot(121)>> pzmap(sys1)>> subplot(122)>> imp

36、ulse(b1,a1)系統(tǒng)在虛軸上有二階極點(diǎn),系統(tǒng)不穩(wěn)定。(2)>> b2=1;>> a2=1 2 1;>> sys2=tf(b2,a2);>> subplot(121)>> pzmap(sys2)ROC為Res-1,系統(tǒng)穩(wěn)定。(3)>> b3=14 0;>> a3=1 0 98 0 2401;>> sys3=tf(b3,a3);>> subplot(121)>> pzmap(sys3)>> subplot(122)>> impulse(b3,a3)&

37、gt;> axis(0 10 -20 20)s右半平面有極點(diǎn),系統(tǒng)不穩(wěn)定。11.3已知系統(tǒng)函數(shù)為Hs=1s2+2as+1,試用MATLAB畫出a=0、14、1、2時(shí)系統(tǒng)的零極點(diǎn)分布圖。如果系統(tǒng)是穩(wěn)定的,畫出系統(tǒng)的幅頻特性曲線,并分析系統(tǒng)極點(diǎn)位置對(duì)系統(tǒng)的幅頻特性有何影響?(提示:利用freqs函數(shù)。)解:(1)a=0時(shí):>> b1=1;>> a1=1 0 1;>> sys1=tf(b1,a1);>> pzmap(sys1)系統(tǒng)是不穩(wěn)定的。(2)a=14時(shí):>> b2=1;>> a2=1 0.5 1;>> s

38、ys2=tf(b2,a2);>> subplot(121)>> pzmap(sys2)>> w=-8*pi:0.01:8*pi;>> H=freqs(b2,a2,w)>> subplot(122)>> plot(w,abs(H),grid on>> plot(w,abs(H),grid on>> xlabel('omega(rad/s)'),ylabel('|H(omega)|')>> axis(-10 10 0 2.5)>> title(&#

39、39;H(s)=1/(s2+0.5s+1)的幅頻特性')(3)a=1時(shí):>> b3=1;>> a3=1 2 1;>> sys3=tf(b3,a3);>> subplot(121)>> pzmap(sys3)>> w=-8*pi:0.01:8*pi;>> H=freqs(b3,a3,w);>> subplot(122)>> plot(w,abs(H),grid on>> xlabel('omega(rad/s)'),ylabel('|H(omeg

40、a)|')>> title('H(s)=1/(s2+2s+1)的幅頻特性')(4)a=2時(shí):>> b4=1;>> a4=1 4 1;>> sys4=tf(b4,a4);>> subplot(121)>> pzmap(sys4)>> w=-8*pi:0.01:8*pi;>> H=freqs(b4,a4,w);>> subplot(122)>> plot(w,abs(H),grid on>> xlabel('omega(rad/s)&#

41、39;),ylabel('|H(omega)|')>> title('H(s)=1/(s2+4s+1)的幅頻特性')綜上可知,極點(diǎn)離虛軸距離越遠(yuǎn),沖激響應(yīng)波形變化越快,但越快穩(wěn)定。第12章 離散時(shí)間信號(hào)的表示及運(yùn)算12.1 試用MATLAB命令分別繪出下列各序列的波形圖。(1)xn=12nu(n)(2)xn=2nu(n)(3)xn=-12nu(n)(4)xn=-2nu(n)(5)xn=2n-1u(n-1)(6)xn=12n-1u(n)解:>> n=-10:10;>> x1=(0.5).n.*uDT(n);>> x2

42、=2.n.*uDT(n);>> x3=(-0.5).n.*uDT(n);>> x4=(-2).n.*uDT(n);>> x5=2.(n-1).*uDT(n-1);>> x6=(0.5).(n-1).*uDT(n);>> subplot(321);>> stem(n,x1,'fill'),grid on>> title('x(n)=(1/2)nu(n)'),xlabel('n')>> subplot(322);>> stem(n,x2,

43、9;fill'),grid on>> title('x(n)=(2)nu(n)'),xlabel('n')>> subplot(323);>> stem(n,x3,'fill'),grid on>> title('x(n)=(-1/2)nu(n)'),xlabel('n')>> subplot(324);>> stem(n,x4,'fill'),grid on>> title('x(n)=(-2)nu

44、(n)'),xlabel('n')>> subplot(325);>> stem(n,x5,'fill'),grid on>> title('x(n)=2(n-1)u(n)'),xlabel('n')>> subplot(326);>> stem(n,x6,'fill'),grid on>> title('x(n)=(1/2)(n-1)u(n)'),xlabel('n')12.2試用MATLAB分別繪出下

45、列各序列的波形圖(1)xn=sinn5(2)xn=cosn10-5(3)xn=(56)nsin(n5)(4)xn=(32)nsin(n5)解:>> n=-10:10;>> x1=sin(n*pi/5);>> x2=cos(n*pi)/10-pi/5);>> x3=(5/6).n.*sin(n.*pi)/5);>> x4=(3/2).n.*sin(n.*pi)/5);>> subplot(221)>> stem(n,x1,'fill'),grid on>> title('x(n

46、)=sin(n*pi/5)'),xlabel('n');>> subplot(222);>> stem(n,x2,'fill'),grid on;>> title('x(n)=cos(n*pi/10-pi/5)'),xlabel('n');>> subplot(223);>> stem(n,x3,'fill'),grid on;>> title('x(n)=(5/6)nsin(n*pi/5)'),xlabel('

47、n');>> subplot(224);>> stem(n,x4,'fill'),grid on;>> title('x(n)=(3/2)nsin(n*pi/5)'),xlabel('n');12 離散時(shí)間LTI系統(tǒng)的時(shí)域分析13.1試用MATLAB命令求解以下離散時(shí)間系統(tǒng)的單位取樣響應(yīng)。(1)3yn+4yn-1+yn-2=xn+x(n-1)(2)52yn+6yn-1+10yn-2=x(n)解:(1)>> a=3 4 1;>> b=1 1;>> n=-5:15;>

48、;> x=impDT(n);>> y=filter(b,a,x);>> stem(n,y,'fill'),grid on>> xlabel('n'),title('3y(n)+4y(n-1)+y(n-2)=x(n)+x(n-1)的單位取樣響應(yīng)')(2)>> a=5/2 6 10;>> b=1;>> n=0:30;>> impz(b,a,30),grid on>> xlabel('n'),title('5/2y(n)+6y(

49、n-1)+10y(n-2)=x(n)的單位取樣響應(yīng)')13.2已知某系統(tǒng)的單位取樣響應(yīng)為hn=(78)nun-un-10,試用MATLAB求當(dāng)激勵(lì)信號(hào)為xn=un-u(n-5)時(shí),系統(tǒng)的零狀態(tài)響應(yīng)。解:>> nx=-2:7;>> nh=-4:14;>> x=uDT(nx)-uDT(nx-5);>> h=(7/8).nh.*(uDT(nh)-uDT(nh-10);>> y=conv(x,h);>> ny1=nx(1)+nh(1);>> ny=ny1+(0:(length(nx)+length(nh)-2);>> subplot(311)>> stem(nx,x,'fill'),gri

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論