how to write the fitness function correctly?

1 visualización (últimos 30 días)
sethu
sethu el 22 de Jun. de 2015
function f =myfunc(t) r1 = @(v) v(1,:); r2 =@(v) v(2,:); f(:,1) =@(t) r1(sim(net,t')); f(:,2) =@(t) r2(1./sim(net,t')); end
after writing this i am trying to access it using the code
ObjFcn =@myfunc; and then i give some lower and upper bounds and next i use
[X,FVAL] =gamultiobj(objFcn,nvars,[],[],[],[],LB,UB)
but my programm stops at the start saying that "non scalar array of function handles are not allowed ,use cell arrays insted"
some one please tell me how to write that objective function (fittness function file).

Respuestas (0)

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!

Translated by