matlab中遗传算法的运行问题,求指教!。
Afficher commentaires plus anciens
function y = optlincontest6(x)
y = x^2+1;
options = gaoptimset('Generations',100,'PopulationSize',400);
lb=10;
ub=30;
[x,fval,exitflag] = ga(@optlincontest6,1,options);
为什么我设定x的区间为10到30,得到的最优结果是x=-8.7828e-5,y=1.0000?
哪里有错误,求指教!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 基于问题的优化设置 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!