回复: [求助]分行输出、多曲线成图和曲线逐一标注
% 这样岂不是很麻烦,m值再大呢?
% matlab是不是有更好的解决办法
% 新手,见笑
x=-1:0.1:10;
m=0
f=2*x.^2-sqrt(x)+m*x
plot(x,f,'b-');
hold on
x=-1:0.1:10;
m=5
f=2*x.^2-sqrt(x)+m*x
plot(x,f,'r-');
hold on
m=10
f=2*x.^2-sqrt(x)+m*x
plot(x,f,'y-');
hold on
x=-1:0.1:10;
m=15
f=2*x.^2-sqrt(x)+m*x
plot(x,f,'g-');
hold on
m=20
f=2*x.^2-sqrt(x)+m*x
plot(x,f,'b--');
|