I want to use GA algorithm, but it gives me this error "Not enough input arguments. "
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Genetic Algorithm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!