Undefined function 'ga' for input arguments of type 'function_handle'.
Ältere Kommentare anzeigen
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
Antworten (1)
Steven Lord
am 24 Jun. 2020
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 Kommentar
DOUIRI Marwa
am 24 Jun. 2020
Kategorien
Mehr zu Mathematics and Optimization finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!