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
2020 年 6 月 24 日
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
カテゴリ
ヘルプ センター および File Exchange で Mathematics and Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!