Following errors are coming. I have attached those errors as screenshot.
can anyone help me out with it.

댓글 수: 1

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 12월 16일
Please provide in cody format, not screensheet.

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

답변 (1개)

Steven Lord
Steven Lord 2019년 12월 16일

0 개 추천

What is Problem.obj? Is it a function handle or is it an array?
If it's an array, then this section of code inside GeneticAlgorithm is an attempt to index into it rather than an attempt to call a function with inputs. If any of the elements of population.Chromosomes(i).Gene are not valid indices for that array, you will receive an error.
population.Chromosomes(i).fitness = obj( population.Chromosomes(i).Gene(:) );

카테고리

도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

질문:

2019년 12월 16일

답변:

2019년 12월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by