资源描述:
《信号与系统matlab课程设计报告》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、南通大学罗开元南通大学电子信息学院信号与系统课程设计报告班级:信131姓名:罗开元学号:1311011022指导老师:张小美设计时间:2015.01.132014—2015学年第一学期南通大学罗开元南通大学罗开元一、连续信号的时域分析二、1.信号的产生(1)阶跃函数function[t,y1]=jieyue(t1,t2,t0)dt=0.01;ttt=t1:dt:t0-dt;tt=t0:dt:t2;t=t1:dt:t2;n=length(ttt);nn=length(tt);u=zeros(1,n);uu=ones(1,nn);y1=[u
2、,uu];return冲激函数function[t,y2]=chongji(t1,t2,t0)dt=0.01;t=t1:dt:t2;n=length(t);y2(1:n)=0;y2(1,(t0-t1)/dt+1)=1/dt;(2)调用上述函数产生信号,,,-6s≤t≤6s,并画出波形。CommandWindowsubplot(3,1,1);[t1,y1]=jieyue(-6,6,2);34南通大学罗开元stairs(t1,y1);axis([-6601.5]);subplot(3,1,2);[t2,y2]=chongji(-6,6,4)
3、;plot(t2,y2);subplot(3,1,3);[t3,y3]=jieyue(-6,6,0);y3=exp(-(t3)).*y3;plot(t3,y3);波形如下图所示:(3)根据f(t)画出f(2t)和f(1-0.5t)的波形t=-3:0.01:3;y=tripuls(t,4,0.6);subplot(3,1,1);plot(t,y);34南通大学罗开元title('f(t)');xlabel('(a)');y1=tripuls(2*t,4,0.6);subplot(3,1,2);plot(t,y1);title('f(2t)
4、');xlabel('(b)');t1=2-2*t;y2=tripuls(1-0.5*t1,4,0.6);subplot(3,1,3);plot(t1,y2);title('f(1-0.5*t)');xlabel('(c)');得到波形如下图所示:34南通大学罗开元已知信号f(t)=(1+t/2)*(u(t+2)-u(t-2)),用matlab求f(t+2),f(t-2),f(-t).f(2t),-f(t),并绘出时域波形。CommandWindowsymst;f=sym(‘(t/2+1)*(Heaviside(t+2)-Heavisi
5、de(t-2))’);subplot(2,3,1);ezplot(f,[-3,3]);y1=subs(f,t,t+2);subplot(2,3,2);ezplot(y1,[-5,1]);y2=subs(f,t,t-2);subplot(2,3,3);ezplot(y2,[-1,5]);y3=subs(f,t,-t);subplot(2,3,4);ezplot(y3,[-3,3]);y4=subs(f,t,2*t);subplot(2,3,5);ezplot(y4,[-2,2]);y5=-f;subplot(2,3,6);ezplot(y
6、5,[-3,3]);仿真结果如下图所示:34南通大学罗开元2、信号的卷积(1)f(t)=f1(t)*f2(t)function[k,f]=myconv(f1,f2,k1,k2,p)f=conv(f1,f2)*p;k0=k1(1)+k2(1);k3=length(f1)+length(f2)-2;k=k0:p:k0+k3*p;(2)求x1=和x2=δ(t+3)+δ(t-3)的卷积x1(t)*x2(t),并验证卷积的性质。CommandWindow[t1,f11]=jieyue(-8,8,0);[t1,f12]=jieyue(-8,8,2)
7、;f1=f11-f12;x1=exp(-t1).*f1;[t2,f21]=chongji(-8,8,-3);[t2,f22]=chongji(-8,8,3);34南通大学罗开元x2=f21+f22;subplot(3,1,1);plot(t1,x1);subplot(3,1,2);plot(t2,x2);[t3,f]=myconv(x1,x2,t1,t2,0.01)subplot(3,1,3);plot(t3,f);仿真结果:(3)已知,,0<=t<=10的卷积f(t)=f1(t)*f2(t)的时域波形图。CommandWindowt1
8、1=0;t12=3;t21=0;t22=10;t1=t11:0.001:t12;34南通大学罗开元ft1=-sign(t1-2);t2=t21:0.001:t22;ft2=exp(-2*t2);t=t11+