Please help me to solve the errors in the program
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
clc
IntCon = 1;
function z=fun(x)
z = ((x(1)^2 + x(2)^2 - 11)^2 + (x(1)+ x(2)^2 - 7)^2 );
A = [];
b = [];
Aeq = [];
beq = [];
lb = [0 0];
ub = [6 6];
nonlcon = [];
x = ga(@fun,2,A,b,Aeq,beq,lb,ub,nonlcon,IntCon)
0 comentarios
Respuestas (1)
Walter Roberson
el 9 de Mayo de 2021
Just need the definition for the function to be below the rest of the script.
IntCon = 1;
A = [];
b = [];
Aeq = [];
beq = [];
lb = [0 0];
ub = [6 6];
nonlcon = [];
x = ga(@fun,2,A,b,Aeq,beq,lb,ub,nonlcon,IntCon)
function z=fun(x)
z = ((x(1)^2 + x(2)^2 - 11)^2 + (x(1)+ x(2)^2 - 7)^2 );
end
0 comentarios
Ver también
Categorías
Más información sobre Genetic Algorithm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!