ERROR : Constraint function must return real value
조회 수: 6 (최근 30일)
이전 댓글 표시
I'm using genetic algorithm as my optimization solver but I keep getting this error and I don't know why.
??? Error using ==> constrValidate at 30 Constraint function must return real value.
any suggestion.
댓글 수: 0
답변 (1개)
Walter Roberson
2015년 12월 25일
Your constraint function is returning a complex value (or possibly a NaN). Remember that the constraint function may be executed with values that are out of range, with it being the responsibility of the constraint function to say whether they are in range.
참고 항목
카테고리
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!