how to write the fitness function correctly?
1 view (last 30 days)
Show older comments
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).
0 Comments
Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!