求助最优解-多元非线性有约束函数的极值。

代码如下,出不来结果,求大神指点,麻烦了,非常感谢。
clear
rou=2700;
L=1.45;
R=0.11;
f=@(x) pi*rou*L*(2*R*x(1)-x(1)^2)+4/3*pi*rou*(R^3-(R-x(1))^3)+...
pi*rou*x(4)*x(3)*x(2)*(2*R-2*x(1)-x(3));
lb=[5 8 5 2];
ub=[14 40 15 6];
x0=[10 10 10 4];
[x, fval ,exitfalg]=fmincon(f,x0,[],[],[],[],lb,ub);

 采纳的回答

0 个投票

Objective Function (Min.): -1278406728.60861
x1: 14
x2: 40
x3: 15
x4: 6
就在边界上限,模型公式没误吧?

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 优化 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!