Save each generation values in structure form Genetic Algorithim

1 回表示 (過去 30 日間)
Zarak Khan
Zarak Khan 2017 年 12 月 11 日
回答済み: Alan Weiss 2017 年 12 月 11 日
Hello,
What i am trying to achieve here is to save all the iterations value from output for genetic algorithim
hand=@(cutpoint) Dfunc(cutpoint,EVVector);
gaopts = gaoptimset('TolFun', 1e-2, 'display''iter','PopulationSize',10,'StallGen',125,'Generations',10,'PlotFcns',@gaplotbestf);
[x,Fval,exitFlag,Output]=ga(hand,4,[],[],[],[],lb,ub,[],gaopts)
After running the code, i only have saved the final values of 'x' and 'Fval' in workspace. My objective is store each value of x and Fval by iterations (10).
It would be great if someone could shed a light on this

回答 (1 件)

Alan Weiss
Alan Weiss 2017 年 12 月 11 日
To save intermediate values, use an output function.
Alan Weiss
MATLAB mathematical toolbox documentation

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by