help multiple legends?

14 visualizaciones (últimos 30 días)
JL555
JL555 el 30 de Abr. de 2016
Editada: JL555 el 2 de Mayo de 2016
[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 comentarios
Walter Roberson
Walter Roberson el 30 de Abr. de 2016
Are your x2 vectors or 2 dimensional arrays?
JL555
JL555 el 1 de Mayo de 2016
Editada: JL555 el 2 de Mayo de 2016
both x1 and x2 is 1x50 double

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 2 de Mayo de 2016
Do not call legend() twice. Call it once and pass in both entries.
  1 comentario
JL555
JL555 el 2 de Mayo de 2016
Editada: JL555 el 2 de Mayo de 2016
yes walter i figured it out...by the way thanks anyway do you have any idea on pareto frontier for 2 objective functions?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by