"Too many input arguments" problem in ga, optimization toolbox. Can someone help help me?
8 次查看(过去 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
0 个评论
采纳的回答
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
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
更多回答(0 个)
另请参阅
类别
在 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!