Writing a function with many outputs, and maximizing over the first output

1 visualización (últimos 30 días)
Dear all,
Hi, I want to maximize a multi-variable function myfun(x), where x is a vector over which we maximize. I'm using Global Optimization Toolbox and it takes a very long time to run. What I want is, when I stop running the Global Optimization Toolbox command, I want Matlab to give the best solution up to that point.
I think my question is, is it possible to write a function with many outputs, where the first output is what I want to maximize and the other outputs store what I want up to that point? If so, how would I write it?
I'd appreciate any and all help. Thank you!
Best, John

Respuestas (1)

Alan Weiss
Alan Weiss el 22 de Jul. de 2015
It is possible that a global output function would do what you want. But I am not completely sure what you are asking, so if this doesn't look like a good suggestion, then try asking again.
Alan Weiss
MATLAB mathematical toolbox documentation

Categorías

Más información sobre Genetic Algorithm 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