I want to maximize one variable mathematical equation x^2+2*X+1 using ga coding. so please help me to solve above equation. i have a population size is 4 number of bits=8 mutation rate=-0.5

댓글 수: 1

Matt J
Matt J 2013년 9월 28일
편집: Matt J 2013년 9월 28일
Help you with what part of it? You don't appear to have done anything yet.

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

답변 (1개)

Walter Roberson
Walter Roberson 2013년 9월 29일

0 개 추천

Code your ga routine to do nothing other than return. Once you have run ga(), throw away all of the results. Then take max() over your population; that will be the value for which X^2 +2*x + 1 is maximal.

카테고리

질문:

2013년 9월 28일

답변:

2013년 9월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by