查看单个帖子
旧 2009-01-01, 08:32   #3
big1980
初级会员
 
注册日期: 2008-07-10
年龄: 44
帖子: 5
声望力: 0
big1980 正向着好的方向发展
默认 回复: [求助]分行输出、多曲线成图和曲线逐一标注

% 这样岂不是很麻烦,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--');
big1980 当前离线   回复时引用此帖