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

代码如下,出不来结果,求大神指点,麻烦了,非常感谢。
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);

 Réponse acceptée

0 votes

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

Plus de réponses (0)

Catégories

En savoir plus sur 优化 dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!