How to save a variable in optimization fitness or constrain function ?

3 Ansichten (letzte 30 Tage)
Ali T
Ali T am 25 Nov. 2015
Beantwortet: Alan Weiss am 30 Nov. 2015
Hi I am curious about how to store the 'obj' variable (I mean fitness value) and 'con' variable (I mean constrain value) to workspace during running algorithm??? I need to save them in each iteration ? For instance, I am interested in building a matrix which is filled with the variable by the rows in optimization problem. The variable is available in fitness function and constrain function in my code...
Thanks a lot.

Antworten (1)

Alan Weiss
Alan Weiss am 30 Nov. 2015
You can use an output function. The example I linked shows how to do exactly what you want.
Alan Weiss
MATLAB mathematical toolbox documentation

Kategorien

Mehr zu Problem-Based Optimization Setup 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