for i_ga =1:20
_options = optimoptions('ga','MaxGenerations',50,'PopulationSize',2000,...
'MaxStallGenerations',Inf,'PlotFcn',@gaplotbestf);
param_pinhole = ga(@fun_ga_pinhole,10,[],[],[],[],lb_pinhole,ubpinhole,[],options);
error = fun_ga_pinhole(param_pinhole);
error_pinhole_rec(i_ga,1)=error;
param_pinhole_rec(i_ga,:)=param_pinhole;
end
Error using optimoptions (line 124)
Invalid solver specified. Provide a solver name or handle (such as 'fmincon' or @fminunc).
Type DOC OPTIMOPTIONS for a list of solvers.
for i_ga =1:20 _options = optimoptions('ga','MaxGenerations',50,'PopulationSize',2000,... 'MaxStallGenerations',Inf,'PlotFcn',@gaplotbestf); param_pinhole = ga(@fun_ga_pinhole,10,[],[],[],[],lb_pinhole,ubpinhole,[],options); error = fun_ga_pinhole(param_pinhole); error_pinhole_rec(i_ga,1)=error; param_pinhole_rec(i_ga,:)=param_pinhole; end
Error using optimoptions (line 124) Invalid solver specified. Provide a solver name or handle (such as 'fmincon' or @fminunc). Type DOC OPTIMOPTIONS for a list of solvers.