help multiple legends?

1 次查看(过去 30 天)
JL555
JL555 2016-4-30
编辑: JL555 2016-5-2
[sol]=aaa(@ptch);
[x1,x2]=ptch(sol)
plot(x1,x2,'r.-');hold on;
xlabel('x1');ylabel('x2')
legend('Modified');
pause('on')
fprintf('Press any key to continue to other algorithm')
pause
[Sol]=bbb(@ptch);
[x1 x2]=ptch(Sol)
plot(x1,x2,'k.-'); hold on;
xlabel('x1');ylabel('x2')
legend('pre modified');
toc
how to display the legend in such a case?
  6 个评论
Walter Roberson
Walter Roberson 2016-4-30
Are your x2 vectors or 2 dimensional arrays?
JL555
JL555 2016-5-1
编辑:JL555 2016-5-2
both x1 and x2 is 1x50 double

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2016-5-2
Do not call legend() twice. Call it once and pass in both entries.
  1 个评论
JL555
JL555 2016-5-2
编辑:JL555 2016-5-2
yes walter i figured it out...by the way thanks anyway do you have any idea on pareto frontier for 2 objective functions?

请先登录,再进行评论。

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by