Filter löschen
Filter löschen

Multiobjective optimization - Creating new plot function

3 Ansichten (letzte 30 Tage)
Nimrod Daniel
Nimrod Daniel am 20 Mär. 2013
Hello,
I want to plot averages of my two optimization objective by generations. (assuming running it by using command line)
By the help file, the plot function is defined as:
function stop = plotfun(options,state,flag)
options — I put here 'options' as defined earlier.
state — should I put here 'optimresults' ?
flag — by definition "String that tells what stage the algorithm is currently in." From where exactly should I take this string?
With regards.

Akzeptierte Antwort

Alan Weiss
Alan Weiss am 21 Mär. 2013
I think you have a misconception that can be quickly cleared up. Take a look at the documentation of custom plot functions.
The misconception is that MATLAB fills in options, state, and flag. You are free to read and use those values, but you do not have to.
The syntax is, in fact,
function state = plotfun(options,state,flag)
If you want the plot function to stop the solver, follow this prescription: set state.StopFlag to a nonempty string.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Weitere Antworten (1)

Nimrod Daniel
Nimrod Daniel am 22 Mär. 2013
Thanks.

Kategorien

Mehr zu Multiobjective Optimization finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by