Not Enough Input Arguments in GA
2 views (last 30 days)
Show older comments
nesrine nesrine on 14 Aug 2014
Commented: Star Strider on 15 Aug 2014
I have this problem when i run my genetic algorithm. At the first time it works but when i run again it return : Not Enough Input Arguments
I want a help to find a solution
Hikaru on 15 Aug 2014
You have to define the variable x before you run this program.
The error "Not Enough Input Arguments" means that MATLAB doesn't know what the values in the brackets in the first line are.
How are you calling the ga function? You have to tell ga the length of x.
That’s given in the second argument to the ga function, termed ‘nvars’ in the documentation.
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!