how I can change a parameters in fitfun in genetic algorithm in each itration of a loop?

조회 수: 3 (최근 30일)
In my code there is a loop that in each itration genetic algorithm optimizes my problem and give me the fval. How can a parameter be changed inside the objective function in a loop, meaning that in each iteration this parameter takes a different value and must be entered into the genetic algorithm? In fact, the value of the objective function(fval) after each itration should be used as an initial guess for the next iteration.
  댓글 수: 1
Matt J
Matt J 2023년 3월 7일
편집: Matt J 2023년 3월 7일
If you are using ga(), constructing the loop is not your responsibility. Once you provide the fitness function, ga will run it through a loop all on its own

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by