ÐźÅϵͳʵÑ鱨¸æ ÏÂÔر¾ÎÄ

ÐÅ ºÅ ʵ Ñé ±¨ ¸æ

ÐÅÏ¢¿ÆѧÓ빤³ÌѧԺ µç×ÓÐÅÏ¢¹¤³Ì ÐÕ Ãû £º ѧ ºÅ £º

ʵÑéÒ»

Ò»¡¢ÊµÑéÄÚÈÝ£º

1¡¢Á¬ÐøÐźŵÄMATLAB±íʾ£º

MATLABÌṩÁË´óÁ¿µÄ²úÉú»ù±¾Ðźŵĺ¯Êý¡£×î³£ÓõÄÖ¸ÊýÐźš¢ÕýÏÒÐźÅÊÇMATLABµÄÄÚ²¿º¯Êý£¬¼´²»°²×°Èκι¤¾ßÏä¾Í¿Éµ÷Óõĺ¯Êý¡£ 2¡¢±à³ÌʵÏÖÌâ

2-2ÒÑÖªÐźÅx(t)Èçͼm2-2ͼËùʾ£¬·Ö±ðÓÃMATLAB±íʾÐźÅx(t)¡¢x(t)cos(50t),²¢»­³ö²¨ÐΣ¬³ÌÐòÈçÏ£º function yt=x2_2(t)

yt=1*(t>=-1&t<0)+4*t.*(t>=0&t<=0.5)+(-4)*(t-1).*(t>0.5&t<=1); %example2_2 t=-2:0.001:2; subplot(2,1,1) plot(t,x2_2(t)) title('x(t)') subplot(2,1,2) A=1;w0=50;

t=-2:0.001:2;phi=0;

xt=[A*cos(w0*t+phi)].*[1*(t>=-1&t<0)+4*t.*(t>=0&t<=0.5)+(-4)*(t-1).*(t>0.5&t<=1)];

plot(t,xt)

title('x(t)cos(50t)') ÔËÐнá¹ûÈçͼËùʾ£º

2-3£¨1£©±àд±íʾÌâM2-3ͼËùʾµÄÐźŲ¨ÐÎx(t)µÄMATLABº¯Êý£¨2£©ÊÔ»­³öx(t)¡¢x(0.5t)¡¢ºÍx(2-0.5t)µÄ²¨ÐÎͼ¡£³ÌÐòÈçÏ£º function yt=x2_3(t)

yt=1*t.*(t>=0&t<2)+2*(t>=2&t<3)+(-1)*(t>=3&t<5); %example2_3 t=-4:0.01:10; subplot(3,1,1) plot(t,x2_3(t)) title('x(t)')

axis([-4,10,-2,3]) t=-4:0.01:10; subplot(3,1,2)

plot(t,x2_3(0.5*t)) title('x(0.5t)') axis([-4,10,-2,3]) t=-6:0.01:8; subplot(3,1,3)

plot(t,x2_3(2-0.5*t)) title('x(2-0.5t)') axis([-6,8,-2,3] ÔËÐнá¹ûÈçÓÐÓÒͼ£º

2-4 »­³öÌâM2-4ͼËùʾÐźŵÄÆæ·ÖÁ¿ºÍż·ÖÁ¿¡£³ÌÐòÈçÏ£º

2-7ÒÑÖªÁ¬ÐøÐźÅx1(t)=cos(6¡Çt)¡¢x2(t)=cos(14¡Çt)¡¢x3(t)=cos(26¡Çt)£¬ÒÔ³éÑùº¯Êýfs=10Hz¶ÔÕâÈý¸öÐźŽøÐгéÑùµÃÀëÉ¢ÐòÁÐx1[k]¡¢x2[k]¡¢x3[k].ÊÔÔÚͬһͼÉÏ»­³öÁ¬ÐøÐźźÍÆäËû¶ÔÓ¦µÄÀëÉ¢ÐòÁС£³ÌÐòÈçÏ£º %program2-7

A=1;w1=6*pi;phi=0;

t1=0:0.0001:1;

xt1=A*cos(w1*t1+phi); subplot(2,3,1) plot(t1,xt1) title('x1(t)') k1=0:20;

xk1=cos(3*pi/5*k1); subplot(2,3,4) stem(k1,xk1) title('x1[k]')

A=1;w2=14*pi;phi=0; t2=0:0.0001:1;

xt2=A*cos(w2*t2+phi); subplot(2,3,2) plot(t2,xt2) title('x2(t)')

k2=0:20;

xk2=cos(7*pi/5*k2); subplot(2,3,5) stem(k2,xk2) title('x2[k]')

A=1;w3=26*pi;phi=0; t3=0:0.0001:1;

xt3=A*cos(w3*t3+phi); subplot(2,3,3) plot(t3,xt3) title('x3(t)')

k3=0:20;

xk3=cos(13*pi/5*k3); subplot(2,3,6) stem(k3,xk3) title('x3[k]')

ÔËÐнá¹ûÈçÓÒÉÏͼ£º

2-8·Ö±ðÓÃsquareº¯ÊýºÍ Swtooth»­³öÌâM2-8ͼËù ʾµÄÀëÉ¢ÖÜÆÚÐòÁС£ ³ÌÐòÈçÏ£º

%program2-81 k=0:1:40;

A=1;T=20;w0=2*pi/T;

xk=A*sawtooth(w0*k,0.5); stem(k,xk)

ÔËÐнá¹ûÈçÓÒͼËùʾ£º

%program2-82 k=0:1:40;

A=-1;T=10;w0=2*pi/T; xk=A*square(w0*k,50); stem(k,xk)

ÔËÐнá¹ûÈçÓÒͼ£º

ʵÑé¶þ

3-1Ò»¸öÁ¬Ðøʱ¼äLTI ϵͳÂú×ãµÄ΢·Ö·½³ÌΪ£º y¡å(t)+3y¡ä(t)+2y(t) =2x¡ä(t)+x(t) %program3_1

ts=0;te=10;dt=0.001; sys=tf([2 1],[1 3 2]); t=ts:dt:te;

x=1*exp(-3*t)*1; y=lsim(sys,x,t); plot(t,y);

xlabel('Time(sec)') ylabel('y(t)')

3-2³ÌÐòÈçÏ£º %program3-2

ts=0;te=5;dt=0.01; sys=tf([6],[1 3]); t=ts:dt:te;

y=impulse(sys,t); plot(t,y);

xlabel('Time(sec)') ylabel('h(t)')

ÔËÐнá¹ûÈçÓÐͼËùʾ£º

%program3-2

ts=0;te=5;dt=0.01; sys=tf([6],[1 3]); t=ts:dt:te; y=step(sys,t); plot(t,y);

xlabel('Time(sec)') ylabel('h(t)')

ÔËÐнá¹ûÈçÓÐͼËùʾ£º

3-4³ÌÐòÈçÏ£º %program3_4

x=[0.85,0.53,0.21,0.67,0.84,0.12]; y=[0.68,0.37,0.83,0.52,0.71]; z=conv(x,y); n=length(z); stem(-3:n-4,z);

ÔËÐнá¹ûÈçÓÐͼËùʾ£º

3-7ijÀëɢʱ¼äLTIϵͳ Âú×ã²î·Ö·½³Ì

Y[k]+0.42y[k-1]-0.19y [k-2]=0.31x[k]+0.68x [k-1]£¬Èôx(t)=0.6ku(k) ÊÔÇóϵͳµÄÁã״̬ÏìÓ¦ Yzs(k),²¢»­³öÇ°20µãͼ¡£ ³ÌÐòÈçÏ %program3_7 k=0:100;

a=[1,0.42,-0.19]; b=[0.31,0.68]; A=1;a=0.6; xk=A*a.^k; stem(k,xk)

y=filter(b,a,xk); axis([0,20,0,1]) xlabel('k'); ylabel('Yzs[k]')

ÔËÐнá¹ûÈçÓÒͼËùʾ£º

3-8ijÀëɢʱ¼äLTIϵͳ Âú×ã²î·Ö·½³Ì

Y[k]+0.7y[k-1]-0.45y [k-2]-0.6y[k-3]=0.8x[k] -0.44x[k-1]+0.36x[k-2] +0.02x[k]£¬

ÊÔÀûÓÃimpzº¯ÊýÇóÆ䵥λ

Âö³åÏìÓ¦£¬,²¢»­³öÇ°30µãͼ¡£ ³ÌÐòÈçÏ£º %program3_8 k=0:100;

a=[1 0.7 0.45 0.6];

b=[0.8 -0.44 0.36 0.02]; h=impz(b,a,k); stem(k,h)

axis([0,30,-1,0.8]) ÔËÐнá¹ûÈçÓÒͼËùʾ£º

ʵÑéÈý

M4-1 ÊÔÇóÌâM4-1ͼËùʾÖÜÆÚ¾ØÐÎÐźźÍÖÜÆÚÈý½Ç²¨ÐźŵÄƵÆ×£¬²¢»­³öƵÆ×ͼ£¬È¡A=1£¬T=2¡£

µÃÈçϳÌÐò 4_1_1³ÌÐòÈçÏ k=-4:0.01:4;

A=1;T=2;w0=2*pi/T;

xk=A*square(w0*k,50); k1=-4:4;N=length(k);k1=(0:N)*0.5*T; x=A*square(w0*k1,50); X=fft(x);

subplot(3,1,1) stem(k1,real(X)) xlabel('k');

title('X[k]µÄʵ²¿'); axis([0,40,-20,60]) subplot(3,1,2) stem(k1,imag(X)); xlabel('k');

title('X[k]µÄÐ鲿'); axis([0,40,-20,60]) xr=ifft(X); subplot(3,1,3)

stem(k1,xr)

axis([0,40,-2,2]) xlabel('k');

title('Öؽ¨µÄX[k]'); 4-1-2 ³ÌÐòÈçÏ£º

k1=-4:0.001:4;N=length(k);k1=(0:N)*0.5*T; x=0.5*sawtooth(w0*k1,0.5)+0.5; X=fft(x);

subplot(3,1,1) stem(k1,real(X)) xlabel('k');

title('X[k]µÄʵ²¿'); axis([0,40,-20,60]) subplot(3,1,2) stem(k1,imag(X)); xlabel('k');

title('X[k]µÄÐ鲿'); axis([0,40,-20,60]) xr=ifft(X); subplot(3,1,3) stem(k1,xr)

axis([0,40,-2,2]) xlabel('k');

title('Öؽ¨µÄX[k]'); ÔËÐнá¹ûÈçÓÐͼËùʾ£º

M4-4 ÊÔÀûÓÃMATLAB¼ÆËãÏÂÁÐÁ¬ÐøÐźŵÄƵÆ×X£¨jw£©£¬»­³öƵÆ×ͼ 4-4-1³ÌÐòÈçÏ£º

(1)x(t)?u(t)?u(t?2);(2)x(t)?cos(2t)[u(t)?u(t?2)];function yt=u(t)

yt=0*(t<0)+1*(t>=0); function yt=xx1(t,w);

yt=(u(t)-u(t-2)).*exp(-j*w*t); w=linspace(-6*pi,6*pi,512); N=length(w);X=zeros(1,N); for k=1:N

X(k)=quadl('xx1',0,2,[],[],w(k)); end

plot(w,real(X)); xlabel('\\omega'); ylabel('X(j\\omega)'); ÔËÐнá¹ûÈçÓÐͼËùʾ£º

4-4-2³ÌÐòÈçÏ£º function yt=u(t) yt=0*(t<0)+1*(t>=0); function yt=xx2(t,w);

yt=cos(2*t).*(u(t)-u(t-2)).*exp(-j*w*t); w=linspace(-6*pi,6*pi,512); N=length(w);X=zeros(1,N); for k=1:N

X(k)=quadl('xx2',0,2,[],[],w(k)); end

plot(w,real(X)); xlabel('\\omega'); ylabel('X(j\\omega)'); ÔËÐнá¹ûÈçÏÂͼËùʾ£º M4-2 £¨1£©ÈôÒÔ

|C0|?2?|Cn|2n?12NPM4-1ͼËùʾÐźŵÄÓÐЧ´ø¿í

??0.90¶¨ÒåÐźŵÄÓÐЧ´ø¿í£¬ÊÔÈ·¶¨Ìâ

Nw0£¬È¡A=1,T=2;

(2)»­³öÓÐЧ´ø¿íÄÚÓÐÏÞÏîг²¨ºÏ³ÉµÄ½üËƲ¨ÐΣ¬²¢¶Ô½á¹û¼ÓÒÔÌÖÂۺͱȽϣ» (3)Ôö¼Óг²¨µÄÏîÊý£¬¹Û²ìÆäºÏ³ÉµÄ½üËƲ¨ÐΣ¬²¢¶Ô½á¹û¼ÓÒÔÌÖÂۺͱȽϣ»

µÃÈçϳÌÐò£º £º

function y=x1(t,w);

y=cos(2*t).*(t>=0&t<=2).*exp(-j*w*t); w=linspace(-6*pi,6*pi,1024); N=length(w); X=zeros(1,N); for k=1:N

X(k)=quadl('x1',0,2,[],[],w(k)); end

figure(1)

plot(w,real(X)); xlabel('\\omega'); ylabel('X(j\\omega)' ÔËÐнá¹ûÈçÓÒͼËùʾ£º

M4-3 ÇóÌâM4-3ͼËùʾÖÜÆÚ¾ØÐÎÐźŵķù¶ÈƵÆ×£¬²¢»­³öƵÆ×ͼ¡£·Ö±ðÈ¡

T?2?,T?4?ºÍT?8?,ÌÖÂÛÖÜÆÚTÓëƵÆ׵ĹØϵ¡£

µÃÈçϳÌÐò£º

function y=x2(t,w); y=1*exp(-j*w*t);

w=linspace(-6*pi,6*pi,512); N=length(w); X=zeros(1,N); for k=1:N

X(k)=quadl('x2',-0.001,9999,[],[],w(k)); end

plot(w,real(X)); xlabel('\\omega'); ylabel('X(j\\omega)'); ÔËÐнá¹ûÈçÓÒͼËùʾ£º

Ìâ4-5: ÒÑÖªÁ¬ÐøÈý½Ç²¨x(t)=1-£üt£ü, £üt£ü<1,ÊÔ¼ÆËãÆäÔÚ0¡«fm£¨Hz£©·¶Î§ÄÚÐźŵÄÄÜÁ¿¡£È¡fm=0.1¡«10HZ ¸ÃÌâ³ÌÐòÈçÏ£º

function yt=x4_5_1(t);

yt=2*sinc(t).*sinc(t).*sinc(t).*sinc(t); fm=linspace(0.1,10,256); N=length(fm);E=zeros(1,N); for k=1:N

E(k)=quadl('x4_5_1',0,fm(k)); end

plot(fm,E); xlabel('Hz'); ylabel('E');