How can I limit maximum value of yy axis of the gaplot fcn?

1 visualización (últimos 30 días)
Vitor Ribeiro
Vitor Ribeiro el 12 de Sept. de 2014
Respondida: Alan Weiss el 12 de Sept. de 2014
Hi. In association with my previous posts, I am trying to plot the results of best individuals so I can see how is working ga in my optimization problem.
About my problem, I have ga evaluating many solutions that I consider invalid through ff. Each invalid solution are not really evaluated and the fval of each one is set by a random number between 1000 and 2000. With this ga, after randomly finding a valid solution with fval rounding between 10 and 100, will prefer to converge to solutions close to the valid ones.
The problem is: I just want to see in plotted results the valid solutions. So I just want to set yy' axis limit of @gaplotbestf to 100.
In fact, I do not have permission for that. I need an alternative so I'm asking your help for this probably simple question.
Any doubt that arise due to my embarassing english, just say it! I'll try to explain to you.
Best regards. Vitor Ribeiro.

Respuesta aceptada

Alan Weiss
Alan Weiss el 12 de Sept. de 2014
While you cannot do this so easily while the optimization is running, you can call
ylim([10,100])
at the end of the optimization and view the plot in the range you prefer.
With more effort, you can write a custom plot function to do whatever you want.
Alan Weiss
MATLAB mathematical toolbox documentation

Más respuestas (0)

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by