Writing a function with many outputs, and maximizing over the first output
1 view (last 30 days)
Show older comments
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
Answers (1)
Alan Weiss
on 22 Jul 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
0 Comments
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!