I want to use GA algorithm, but it gives me this error "Not enough input arguments. "
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Armin Lotfy
am 11 Mai 2022
Beantwortet: Matt J
am 11 Mai 2022
Hi everyone, I want to use GA algorithm gor my application but it gives me this error any body knows the problem?
code:
LB= zeros(1,9);
UB= zeros(1,9);
for i = 1:9
LB(1,i) = 1;
end
for i = 1:9
UB(1,i) = 3;
end
LB(1,10:17) = [0 -5.1 0.01 0.01 0.01 0.1 0.1 0.1];
UB(1,10:17) = [100 4 1 1 1 200 200 2000];
options = optimoptions(@ga,'PopulationSize', 80, ...
'MaxGenerations', 20, ...
'Display','iter');
x = ga(flc_cost_fcn,17,[],[],[],[],LB,UB,[],options);
[cost, out] = flc_cost_fcn (x);
error:
Not enough input arguments.
Error in flc_cost_fcn (line 10)
a = floor(p(1:9));
Error in untitled5 (line 28)
x = ga(flc_cost_fcn,17,[],[],[],[],LB,UB,[],options);
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Genetic Algorithm finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!