[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

Azzi Abdelmalek
Azzi Abdelmalek 2016년 4월 30일
What case?
JL555
JL555 2016년 4월 30일
편집: JL555 2016년 4월 30일
That coding i posted...because only one legend comes and not 2
Walter Roberson
Walter Roberson 2016년 4월 30일
You legend once for every iteration of your for loops. You need 42 legend entries.
JL555
JL555 2016년 4월 30일
편집: JL555 2016년 4월 30일
My bad let me edit the code
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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Graphics Performance에 대해 자세히 알아보기

태그

질문:

2016년 4월 30일

편집:

2016년 5월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by