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

1 visualizzazione (ultimi 30 giorni)
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

Risposte (1)

Alan Weiss
Alan Weiss il 22 Lug 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

Community Treasure Hunt

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

Start Hunting!

Translated by