Genetic Algorithm - Plotting fitness values
2 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I'm running a genetic algorithm in Matlab with [x,fval]=ga(gaproblem)
This all works fine and I get nice results. Now I wish to plot the best fitness function value at each generation; according to the user manual it should be as simple as setting
gaproblem.PlotFcns=@gaplotbestf;
This however produces no result, I get no figure. As far as I understand @gaplotbestf is built in, and there should be no need to define it, or am I getting it wrong?
It would be nice if someone could help.
0 件のコメント
採用された回答
Seth DeLand
2013 年 3 月 11 日
PlotFcns needs to be passed in as an option for ga:
problem.options.PlotFcns = @gaplotbestf;
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Genetic Algorithm についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!