ERROR : Constraint function must return real value
4 ビュー (過去 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!