带有非线性约束的非线性方程优化 编出程序提示错误 求助。
显示 更早的评论
目标函数
Function v=myfun(x)
v=0.25*3.14*x(1)^2*x(2);
约束
function [c,ceq]=mycon(x)
%约束条件
c(1)=24000-0.25*3.14*0.8*63.347*x(1)^(2/3)*x(2)-0.25*3.14*(0.8)^(1/3)*450*x(1)^(5/3);
c(2)=24000-3.14* 63.347 *x(1)*x(2)-0.25*3.14*(25000-25*x(1))*(x(1)^2);
c(3)=4*1/3.14*1/2000*24000*1/(x(1)^2)*x(2)+1/3.14*1/20000*24000*1/x(1)*1/x(2)-0.04 ;
ceq=[];
主程序
l=[0;0]; %下限
x0=[0;0]; %赋初值
[x,favl,exitflag]=fmincon(@myfun,x0,[],[],[],[],l,[],@mycon)
程序运行后提示如下截图

采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Global or Multiple Starting Point Search 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!