Variable x at each generation

1 次查看(过去 30 天)
While optimization through GA, how to get variable value at each generation? Say If I am doing for y=x^2-2x+78, I am getting final x value. I want to get x value at each generations?

回答(1 个)

Alan Weiss
Alan Weiss 2014-5-7
Alan Weiss
MATLAB mathematical toolbox documentation
  3 个评论
Alan Weiss
Alan Weiss 2014-5-7
You can write an output function along these lines. Be careful, GA uses a slightly different syntax for its output functions; refer to my previous link.
Alan Weiss
MATLAB mathematical toolbox documentation
GA optimization
GA optimization 2014-5-7
Hi, I tried, it is not working. Will you please write the code using above mentioned function or any function to get x(1) and x(2) value at each generations.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by