如图
题主的问题,可以用plot函数作答。
一、用for循环,计算Y1、Y2函数值
for t=0:pi/50:4
Y1=exp(-t/3)
Y2=exp(-t/3)*sin(3*t)
end
二、用矩阵的形式,计算Y1、Y2函数值
t=0:pi/50:4;
Y2=exp(-t/3).*sin(3*t)
三、绘图
plot(t,Y1,t,Y2)
legend('Y1(t)','Y2(t)')
xlabel('t'), ylabel('Y1,Y2')