通过MATLAB软件画出指数衰减曲线y=e(-⅓)*sin3t和它的包络yₗ=e^-⅓,其中t的取值范围为(0,4π)
是这样吗?
clc
clear
t=0:0.01:4*pi;
y=(-1/3)*sin(3*t);
y1=exp(-1/3);
t=0:0.01:4*pi;
plot(t,y);
hold on
plot(t,y1);
hold on
指数衰减曲线不是这样的,指数函数里面你漏了t吧,我改了一下,代码是这样的:
clc
clear
t=0:0.01:4*pi;
y=exp(-1/3*t).*sin(3*t);
y1=exp(-1/3*t);
t=0:0.01:4*pi;
plot(t,y);
hold on
plot(t,y1);
运行结果如下: