I want to know the information about genetic algorithm for optimization of equation with 2 parameters and code
조회 수: 2 (최근 30일)
이전 댓글 표시
I want to know the information about genetic algorithm for optimization of equation with 2 parameters and code if the example is related to mechanical with multiple equations Thank you
댓글 수: 0
답변 (1개)
Walter Roberson
2016년 1월 25일
nvars = 2;
best_location = ga(@objective_function, nvars);
Where objective_function is the function that takes a vector of length nvars and calculates a fitness (lower value being better, so if you are trying to maximize something, return the negative of what you want maximized.)
댓글 수: 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!