필터 지우기
필터 지우기

GWO structure help, please rewrite the code help

조회 수: 1 (최근 30일)
manish kumar
manish kumar 2019년 3월 14일
댓글: Stephan 2019년 3월 14일
NumAgents = 7;
maxiters = 2000;
lb = [0 2];
ub = [1 5];
dim = 2;
fobj = @my_function_that_expects_a_vector_of_2_values;
GWO(Numagents, maxiters, lb, ub, dim, fobj)
I am executing this code after installing the GWO toolbox in my matlab directory.
error appears as:
Not enough input arguments.
Error in GWO (line 116)
set(handles.itertext,'String', ['The current iteration is ', num2str(l)])
Error in gwostrcture (line 14)
GWO(Numagents, maxiters, lb, ub, dim, fobj)
i am unable to detect the error. can any one help me to rectify this issue.

답변 (1개)

Stephan
Stephan 2019년 3월 14일
NumAgents = 7;
maxiters = 2000;
lb = [0 2];
ub = [1 5];
dim = 2;
fobj = @my_function_that_expects_a_vector_of_2_values;
[BestScore, BestPos, CG_Curve] = GWO(NumAgents, maxiters, lb, ub, dim, fobj)
  댓글 수: 8
manish kumar
manish kumar 2019년 3월 14일
its were there in code but the error was same
Stephan
Stephan 2019년 3월 14일
For me it worked properly. I loaded the GWO down from this source:
and the code works without any problems.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by