Borrar filtros
Borrar filtros

GWO structure help, please rewrite the code help

1 visualización (últimos 30 días)
manish kumar
manish kumar el 14 de Mzo. de 2019
Comentada: Stephan el 14 de Mzo. de 2019
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.

Respuestas (1)

Stephan
Stephan el 14 de Mzo. de 2019
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 comentarios
manish kumar
manish kumar el 14 de Mzo. de 2019
its were there in code but the error was same
Stephan
Stephan el 14 de Mzo. de 2019
For me it worked properly. I loaded the GWO down from this source:
and the code works without any problems.

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by