i am using Matlab2010a .how do i eliminate this error: ??? Undefined function or method 'initializega' for input arguments of type 'double'. Error in ==> PID_GA at 8 initPop=in​itializega​(populatio​nSize,vari​ableBounds​,evalFN,ev​alOps,opti​ons);

2 views (last 30 days)
%Initialising the genetic algorithm populationSize=80; variableBounds=[-100 100;-100 100;-100 100]; evalFN='PID_objfun_MSE'; %Change this to relevant object function evalOps=[]; options=[1e-6 1]; initPop=initializega(populationSize,variableBounds,evalFN,evalOps,options); %Setting the parameters for the genetic algorithm bounds=[-100 100;-100 100;-100 100]; evalFN='PID_objfun_MSE'; %change this to relevant object function evalOps=[]; startPop=initPop; opts=[1e-6 1 0]; termFN='maxGenTerm'; termOps=100; selectFN='normGeomSelect'; selectOps=0.08; xOverFNs='arithXover'; xOverOps=4; mutFNs='unifMutation'; mutOps=8; %Performing the genetic algorithm [x,endPop,bPop,traceInfo]=ga(bounds,evalFN,evalOps,startPop,opts,... termFN,termOps,selectFN,selectOps,xOverFNs,xOverOps,mutFNs,mutOps);

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!