急!matlab 如何完成非线性约束优化小弟想用matlab求下面的最小值:目标函数:f=0.5*[1.067*10^7-1169*x(1)+8.82*x(1)^2-0.003*x(1)^3+4.53*10^-7*x(1)^4]+8.89/[-9506-0.0083*x(1)^2/x(2)^2-0.00023(-3641.48+x(1))*(395.84+x(1))*x(2)];
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/05 22:20:24
![急!matlab 如何完成非线性约束优化小弟想用matlab求下面的最小值:目标函数:f=0.5*[1.067*10^7-1169*x(1)+8.82*x(1)^2-0.003*x(1)^3+4.53*10^-7*x(1)^4]+8.89/[-9506-0.0083*x(1)^2/x(2)^2-0.00023(-3641.48+x(1))*(395.84+x(1))*x(2)];](/uploads/image/z/1589018-50-8.jpg?t=%E6%80%A5%21matlab+%E5%A6%82%E4%BD%95%E5%AE%8C%E6%88%90%E9%9D%9E%E7%BA%BF%E6%80%A7%E7%BA%A6%E6%9D%9F%E4%BC%98%E5%8C%96%E5%B0%8F%E5%BC%9F%E6%83%B3%E7%94%A8matlab%E6%B1%82%E4%B8%8B%E9%9D%A2%E7%9A%84%E6%9C%80%E5%B0%8F%E5%80%BC%EF%BC%9A%E7%9B%AE%E6%A0%87%E5%87%BD%E6%95%B0%EF%BC%9Af%3D0.5%2A%5B1.067%2A10%5E7-1169%2Ax%281%29%2B8.82%2Ax%281%29%5E2-0.003%2Ax%281%29%5E3%2B4.53%2A10%5E-7%2Ax%281%29%5E4%5D%2B8.89%2F%5B-9506-0.0083%2Ax%281%29%5E2%2Fx%282%29%5E2-0.00023%28-3641.48%2Bx%281%29%29%2A%28395.84%2Bx%281%29%29%2Ax%282%29%5D%3B)
急!matlab 如何完成非线性约束优化小弟想用matlab求下面的最小值:目标函数:f=0.5*[1.067*10^7-1169*x(1)+8.82*x(1)^2-0.003*x(1)^3+4.53*10^-7*x(1)^4]+8.89/[-9506-0.0083*x(1)^2/x(2)^2-0.00023(-3641.48+x(1))*(395.84+x(1))*x(2)];
急!matlab 如何完成非线性约束优化
小弟想用matlab求下面的最小值:
目标函数:f=0.5*[1.067*10^7-1169*x(1)+8.82*x(1)^2-0.003*x(1)^3+4.53*10^-7*x(1)^4]+8.89/[-9506-0.0083*x(1)^2/x(2)^2-0.00023(-3641.48+x(1))*(395.84+x(1))*x(2)];
约束条件:x(1)+x(2)
急!matlab 如何完成非线性约束优化小弟想用matlab求下面的最小值:目标函数:f=0.5*[1.067*10^7-1169*x(1)+8.82*x(1)^2-0.003*x(1)^3+4.53*10^-7*x(1)^4]+8.89/[-9506-0.0083*x(1)^2/x(2)^2-0.00023(-3641.48+x(1))*(395.84+x(1))*x(2)];
编写M文件fun.m
function f=fun(x)
f=0.5*(1.067*10^7-1169*x(1)+8.82*x(1)^2-0.003*x(1)^3+4.53*10^7-x(1)^4)+8.89/(-9506-0.0083*x(1)^2/x(2)^2-0.00023*(-3641.48+x(1))*(395.84+x(1))*x(2));
命令窗口输入
>> [x,fval]=fmincon('fun',rand(2,1),[],[],[],[],[1200;3.9],[2500;5.571])
Warning:Large-scale (trust region) method does not currently solve this type of problem,
switching to medium-scale (line search).
> In fmincon at 260
Optimization terminated:first-order optimality measure less
than options.TolFun and maximum constraint violation is less
than options.TolCon.
Active inequalities (to within options.TolCon = 1e-006):
lower upper ineqlin ineqnonlin
1
x =
1.0e+003 *
2.5000
0.0039
fval =
-1.9531e+013
你的目标函数我做了改动,你看看一致不