フィルターのクリア

what is wrong with my genetic algorithm?

2 ビュー (過去 30 日間)
Maher
Maher 2018 年 5 月 8 日
コメント済み: Matt J 2018 年 5 月 8 日
Why am I am getting not enough input arguments for this simple genetic problem? please, see attachment for code and optimization app.

回答 (1 件)

Matt J
Matt J 2018 年 5 月 8 日
編集済み: Matt J 2018 年 5 月 8 日
GA has no way of knowing that your fitness function expects 2 arguments, F and x, and no way of dealing with that if you just pass @fit alone. Presumably your fitness function should really be @(x) fit(F,x).
  2 件のコメント
Maher
Maher 2018 年 5 月 8 日
Thank you very much. It worked!
Matt J
Matt J 2018 年 5 月 8 日
You're welcome, but please Accept-click the answer to certify that. I also urge you to do the same for other contributors who have successfully answered your previous questions.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by