matlab中遗传算法的运行问题,求指教!。
Show older comments
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?
哪里有错误,求指教!
Accepted Answer
More Answers (0)
Categories
Find more on 基于问题的优化设置 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!