"Too many input arguments" problem in ga, optimization toolbox. Can someone help help me?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Luigi Treccozzi
am 28 Jan. 2018
Kommentiert: Asiye Ulas
am 17 Mär. 2021
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
0 Kommentare
Akzeptierte Antwort
Sruthi Geetha
am 12 Feb. 2018
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 Kommentare
Mostafa Nakhaei
am 22 Jun. 2020
Bearbeitet: Mostafa Nakhaei
am 22 Jun. 2020
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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Genetic Algorithm finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!