フィルターのクリア

"Too many input arguments" problem in ga, optimization toolbox. Can someone help help me?

5 ビュー (過去 30 日間)
Hi guys. I'm using ga (Genetic Algorithm) toolbox. I'm not using code except for my fitness function and the generate initial population function (that, by the way, work since I tested them individually and they returned what I want). Now, the problem is that I can't start the algrithm because matlab always warns me that there are "Too many input argument". Any ideas?
I can add that even if I modify the fitness function and the input arguments (down to 2) matlab always says they are "too many", though I changed that parameter in the toolbox. Thanks

採用された回答

Sruthi Geetha
Sruthi Geetha 2018 年 2 月 12 日
GA is part of the Global Optimization Toolbox. However it is possible that you have another version of GA that is not shipped by the MathWorks.
Execute the following on your MATLAB command line to see all versions of GA on your installation:
>> which -all ga
If you see more than one output then you have some that are shadowed. If you would like to use the default GA please run the following:
>> restoredefaultpath
>> rehash toolboxcache
If the above does not help, please try the suggestions in the following link and see if any of that works for you: https://in.mathworks.com/matlabcentral/answers/4077-error-too-many-input-arguments
  2 件のコメント
Mostafa Nakhaei
Mostafa Nakhaei 2020 年 6 月 22 日
編集済み: Mostafa Nakhaei 2020 年 6 月 22 日
Thats worked for me. I had a file "ga.m" in my directory somewhere that was the culprit. It was suppressing the matlab "ga.m" file that was shipped with matlab originally. I simply changed my "ga.m" file to something else and it is working just fine.
Thank you so Much.
Mostafa
Asiye Ulas
Asiye Ulas 2021 年 3 月 17 日
Thank you You save my day :)

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

その他の回答 (0 件)

カテゴリ

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