Undefined function 'ga' for input arguments of type 'function_handle'.

Repeter_Optimisation=1;
while Repeter_Optimisation==1
fprintf('Entrer la fonction objective sous la forme suivante:\nf_Obj = -w1*compression-w2*flexion+w3*CoutTotal\nEntrer des valeurs positives de poids\n');
w = input('Donner le vecteur des poids [w1 w2 w3]= ');
f_Obj = @(net_inputs) sim(net,net_inputs')'*w';
LB = [-1 ;-1;-1];
UB = [1; 1;1];
Pop_Size = input('Entrer la taille de la population: ');
Criter_darret=input('Entrer la valeur de tolérancement pour arrêter les iterations: ')
options= optimset('PlotFcns',{@gaplotbestf,@gaplotstopping,@gaplotscorediversity,@gaplotscores},...
'FinDiffRelStep',Pop_Size,'Display', 'iter','TolFun',Criter_darret);
which -all ga
F_Obj = ga(f_Obj,w,[],[],[],[],LB,UB,[],options)
Valeurs_optimales = mapminmax('reverse',F_Obj',PS1)'
fprintf(' Epaisseur DensiteSurfacique\n');
Repeter_Optimisation = input('Est-ce que vous voulez repeter l optimisation?\n1:Oui\n2:Non\n ');
end

回答 (1 件)

Steven Lord
Steven Lord 2020 年 6 月 24 日

0 投票

Do you have Global Optimization Toolbox licensed and installed? The ga function is part of that toolbox. You can check if you have it installed by looking at the text displayed by the ver function.
ver

1 件のコメント

DOUIRI Marwa
DOUIRI Marwa 2020 年 6 月 24 日
thank you for your reply
I am working on a trial version of matlab, online.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMathematics and Optimization についてさらに検索

質問済み:

2020 年 6 月 24 日

コメント済み:

2020 年 6 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by