how to write the fitness function correctly?
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Genetic Algorithm についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!