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

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.

답변 (1개)

Alan Weiss
Alan Weiss 2015년 11월 30일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

질문:

2015년 11월 25일

답변:

2015년 11월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by