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일
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

thank you for your reply
I am working on a trial version of matlab, online.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Mathematics 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