运行matble出现Optimization terminated:first-order optimality is less than options.TolFun.咋改?本身就是新手,我百度了一下说是超出精度的问题,还请大神指点一下(最好是带着修改完之后的图看看,f=@(x)1100*exp(

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/27 09:03:48
运行matble出现Optimization terminated:first-order optimality is less than options.TolFun.咋改?本身就是新手,我百度了一下说是超出精度的问题,还请大神指点一下(最好是带着修改完之后的图看看,f=@(x)1100*exp(

运行matble出现Optimization terminated:first-order optimality is less than options.TolFun.咋改?本身就是新手,我百度了一下说是超出精度的问题,还请大神指点一下(最好是带着修改完之后的图看看,f=@(x)1100*exp(
运行matble出现Optimization terminated:first-order optimality is less than options.TolFun.咋改?
本身就是新手,我百度了一下说是超出精度的问题,还请大神指点一下(最好是带着修改完之后的图看看,
f=@(x)1100*exp(-0.1386*x);
h=@(x)6600*exp(-0.1155*x)-6600*exp(-0.1386*x);
g=@(x)1650*exp(-0.1386*x)-1609.5*exp(-0.2310*x);
fplot(@(x)[f(x),h(x),g(x)],[-0.25 15]);
xfh=[];xfg=[];xhg=[];
for x0=[0,1,2,3,8]
xfh(end+1)=fsolve(@(x)f(x)-h(x),x0);
xfg(end+1)=fsolve(@(x)f(x)-g(x),x0);
xhg(end+1)=fsolve(@(x)h(x)./g(x)-1,x0);
end
xfh=unique(xfh);yfh=f(xfh);
xfg=unique(xfg);yfg=f(xfg);
xhg=unique(xhg);yhg=h(xhg);
hold on
plot(xfh,yfh,'o',xfg,yfg,'d',xhg,yhg,'^')
for i=1:length(xfh)
text(xfh(i),yfh(i),[' (',num2str(xfh(i)),',',num2str(yfh(i)),')'])
end
for i=1:length(xfg)
text(xfg(i),yfg(i),[' (',num2str(xfg(i)),',',num2str(yfg(i)),')'])
end
for i=1:length(xhg)
text(xhg(i),yhg(i),[' (',num2str(xhg(i)),',',num2str(yhg(i)),')'])
end

运行matble出现Optimization terminated:first-order optimality is less than options.TolFun.咋改?本身就是新手,我百度了一下说是超出精度的问题,还请大神指点一下(最好是带着修改完之后的图看看,f=@(x)1100*exp(
1、你这只给出了目标函数,是怎样调用出现那个提示的?
2、目标函数是个向量,你是要按照多目标优化求解吗?如果是,按照哪种意义的最优?加权还是帕累托?
希望对你能有所帮助.