信号与系统报告总结

  • 格式:doc
  • 大小:842.00 KB
  • 文档页数:14

实验一 2.

. 程序:t=0:0.01:30; x=exp(-2^0.5*t).*(2*t/3); plot(x);

3. 程序:n=-10:10; n1=(n>=-3)&(n<=3); x=2.*n1.*n; (n,x);

4.

程序:t=-2:0.001:3; f1=((t>=-1)&(t<=1)); f2=((t>=-1)&(t<=2)); f=f1+f2; plot(t,f); axis([-2 3 0 2.5]);

5. 程序:subplot(221); k=-1:4; t=0:5; f1=t; stem(k,f1); subplot(222); k1=-5:1 t2=6:-1:0; f2=t2; stem(k1,f2); subplot(223); a=min(min(k1),min(k1)); b=max(max(k),max(k)); n=a:b; y1=[0,0,0,0,f1]; y2=[f2,0,0,0] y=(y1-y2).*1; stem(n,y); subplot(224) x=(y1.*y2).*1; stem(n,X)

实验二 1. 程序:a=[1 2 2]; b=[1 0]; sys=tf(b,a); td=0.01; t=0:td:10; f=1.*(t>=0); y=lsim(sys,f,t); subplot(131); plot(t,y); xlabel('t(sec)'); ylabel('y(t)'); grid on; h=impulse(sys,t); subplot(132); plot(t,h); xlabel('t(sec)'); ylabel('h(t)'); grid on; g=step(sys,t); subplot(133); plot(t,g); xlabel('t(sec)'); ylabel('g(t)'); grid on;

2. 程序:t=-6:6; z1=1.*(t==-1); z2=2.*(t==0); z3=1.*(t==1); f1=z1+z2+z3; f2=1.*(t>=-2)&(t<3); [y,k]=dconv(double(f1),double(f2),t,t); stem(k,y); axis([-6,6,0,5]);

3.

程序:td=0.01; t=-5:td:5; z1=((t+1)>=0); z2=((t-1)>=0); y1=2*(z1-z2); z3=((t+2)>=0); z4=((t-2)>=0); y2=z3-z4; [y,k]=cconv(y1,y2,t,t,td); plot(k,y); axis([-10,10,0,5]); 实验三 1

程序:T=2;w=2*pi/T; a0=quadl(@singftr,-1,1)*2/T; N=10;an=zeros(1,N);bn=zeros(1,N); for k=1:N ; an(k)=quadl(@ftrcos,-1,1,[],[],k,w)*2/T; bn(k)=quadl(@ftrsin,-1,1,[],[],k,w)*2/T; end; n=1:1:N; figure(1); subplot(1,2,1);stem(n,an,'-o');grid on; subplot(1,2,2);stem(n,bn,'-o');grid on; t=-3:0.01:3; x=pulstran(t+0.5,-3:2:3,'tripuls',1,1); figure(2);subplot(6,2,1); plot(t,x); axis([-3,3,-1,2]);grid on; subplot(6,2,2);plot(t,a0/2);grid on; wave=a0/2; for k=1:10 wave=wave+an(k)*cos(k*w*t)+bn(k)*sin(k*w*t); subplot(6,2,k+2);plot(t,wave);grid on; end

2. 程序:R=0.005;t=-2:R:2; f=cos(t*pi/2); w1=40;N=1000;k=-N:N;w=k*w1/N; F=f*exp(-j*t'*w)*R; Fudu=real(F); figure(1); subplot(2,1,1);plot(t,f); xlabel('t');ylabel('f(t)');grid on; subplot(2,1,2);plot(w,Fudu); xlabel('w');ylabel('F(jw)');grid on; sf=cos(pi*t/4); w1=40;N=1000;k=-N:N;w=k*w1/N; SF=sf*exp(-j*t'*w)*R; SFudu=real(SF); figure(2); subplot(2,1,1);plot(t,sf); xlabel('t');ylabel('sf(t)');grid on; subplot(2,1,2);plot(w,SFudu); xlabel('w');ylabel('SF(jw)');grid on; mf=f.*cos(10*pi*t); figure(3); subplot(3,1,1);plot(t,cos(10*pi*t)); ylabel('y(t)=cos(10*pi*t)');grid on; subplot(3,1,2);plot(t,mf); ylabel('f1(t)=f(t)*cos(10*pi*t)');grid on; MF=mf*exp(-j*t'*w)*R; MFudu=real(MF); subplot(3,1,3);plot(w,MFudu); xlabel('w');ylabel('MF(jw)');grid on;

3.

程序:R=0.005; t=-2:R:2; z1=((t+1)>=0); z2=((t-1)>=0); g=z1-z2; f=t.*g; %f=(abs(t)<=1); w1=40;N=1000;k=-N:N;w=k*w1/N; F=f*exp(-j*t'*w)*R; Fudu=real(F); figure(1); subplot(2,1,1);plot(t,f); xlabel('t');ylabel('f(t)'); grid on; subplot(2,1,2);plot(w,Fudu); xlabel('w');ylabel('F(jw)'); grid on; mf=f.*cos(10*pi*t); figure(2); subplot(3,1,1);plot(t,cos(10*pi*t)); ylabel('y(t)=cos(10*pi*t)'); grid on; subplot(3,1,2);plot(t,mf); ylabel('f1(t)=f(t)*cos(10*pi*t)'); grid on; MF=mf*exp(-j*t'*w)*R; MFudu=real(MF); subplot(3,1,3);plot(w,MFudu); xlabel('w');ylabel('MF(jw)'); grid on;

4.

程序:b=[1 0];a=[1 3 2];w=linspace(0,5,200); H=freqs(b,a,w); figure(1); subplot(2,1,1); plot(w,abs(H)); xlabel('\omega');ylabel('|H(j\omega)|'); grid on; subplot(2,1,2); plot(w,angle(H)); xlabel('\omega');ylabel('phi');grid on;

实验四 1.

程序:num=[5]; den=[1 1 4 4]; [r,p,k]=residue(num,den) 结果:r = -0.5000 - 0.2500i -0.5000 + 0.2500i 1.0000 p = -0.0000 + 2.0000i -0.0000 - 2.0000i -1.0000 k = []

2. 程序:num=[1 0 -4]; den=[1 2 -3 2 1]; zs=roots(num);ps=roots(den); figure(1); plot(real(zs),imag(zs),'o',real(ps),imag(ps),'ks','markersize',12); axis([-4,3,-1,1]); grid on; sys=tf(num,den); figure(2); pzmap(sys);

3.