how to write the fitness function correctly?

2 ビュー (過去 30 日間)
sethu
sethu 2015 年 6 月 22 日
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 件)

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by