(R2016.a) Undefined function or variable 'gaoptimset'.
Mostrar comentarios más antiguos
I am using ga and have the following block included in my program
%Start with default options
options = gaoptimset;
%%Modify some parameters
options = gaoptimset(options,'PopInitRange' ,[LB;UB]);
options = gaoptimset(options,'PopulationSize',PopulationSize);
options = gaoptimset(options,'Generations',Generations);
options = gaoptimset(options,'StallGenLimit' ,inf);
options = gaoptimset(options,'StallTimeLimit',inf);
options = gaoptimset(options,'MutationFcn' ,@mutationadaptfeasible);
options = gaoptimset(options,'TolCon',1e-6);
options = gaoptimset(options,'TolFun',1e-6);
options = gaoptimset(options,'Display' ,'iter');
options = gaoptimset(options,'EliteCount',PopulationSize/10);
options = gaoptimset(options,'CrossoverFraction' ,0.6);
% options = gaoptimset(options,'Vectorized' ,'on');
What worked out several times. Now I get the error
Undefined function or variable 'gaoptimset'. Any ideas to solve it?
Respuestas (2)
Star Strider
el 18 de Nov. de 2017
You could have a path problem.
Run these lines from the Command Window or a script:
restoredefaultpath
rehash toolboxcache
2 comentarios
Janosch Fagaschewski
el 19 de Nov. de 2017
Star Strider
el 19 de Nov. de 2017
The first option to solve path problems is to run the commands I quoted. Did you run them? What was the result?
Janosch Fagaschewski
el 19 de Nov. de 2017
0 votos
Categorías
Más información sobre Signal Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!