can anyone tell whre is the error ?

1 次查看(过去 30 天)
x=-2*pi:0.01:2*pi
%x2=-pi/2:3*pi/25:pi
y=exp(x)
z=sqrt(exp(-x))
figure(3)
plot(x,y,'b','LineWidth',2,x,z,'r','LineWidth',1)
this code doesn't work can anyone tell me why
  1 个评论
VBBV
VBBV 2024-3-3
x=-2*pi:0.01:2*pi;
%x2=-pi/2:3*pi/25:pi
y=exp(x);
z=sqrt(exp(-x));
figure(3)
hold on
plot(x,y,'b','LineWidth',2); yyaxis right
plot(x,z,'r','LineWidth',1)

请先登录,再进行评论。

采纳的回答

Stephan
Stephan 2020-1-19
编辑:Walter Roberson 2024-3-3
x=-2*pi:0.01:2*pi;
y=exp(x);
z=sqrt(exp(-x));
figure(3)
p=plot(x,y,'r',x,z,'b');
p(1).LineWidth = 2;
p(2).LineWidth = 1;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by