subplot(2,4,1);plot(t1,f1);axis([-5,5,0,1.2]);xlabel('时间(t)'); ylabel('f1(t)');title('单位阶跃函数');
subplot(2,4,2);plot(t1,f2);ylabel('f2(t)'); title('单位冲激函数');
subplot(2,4,3);plot(t1,f3);ylabel('f3(t)');xlabel('时间(t)'); title('门函数');axis([-5,5,0,2]);
y1=conv(f1,f2);r=2*length(t1)-1;t=-10:1/a:10; subplot(2,4,4);plot(t,y1);axis([-5,5,0,1.2]);
title('f1与f2的卷积');ylabel('y1(t)');xlabel('时间(t)'); y2=conv(f2,f1);r=2*length(t1)-1;t=-10:1/a:10; subplot(2,4,5);plot(t,y2);axis([-5,5,0,1.2]);
title('f2与f1的卷积');ylabel('y2(t)');xlabel('时间(t)'); y3=conv(f1,f2+f3);y4=conv(f1,f2)+conv(f1,f3);
subplot(2,4,6);plot(t,y3);title('f1与f2+f3的卷积');xlabel('时间(t)');
ylabel('y3(t)');axis([-5,10,0,6000]);
subplot(2,4,7);plot(t,y4);title('f1与f2卷积,f1与f3卷积之和');ylabel('y4(t)');
xlabel('时间(t)');axis([-5,10,0,6000]); 各个波形如图1.6所示:
图1.6
周卫华