此最优化问题,可以用fmincon()求得,其结果
x = 0.7782 0.3846 40.3196 200.0000
fval = 3.4820e+03
目标函数:
function f =myfun(x)
f=0.6224*x(1)*x(2)*x(3)*x(4)+1.7781*x(2)*x(3)^2+3.1661*x(1)^2*x(4)+19.84*x(1)^2*x(3);
end
约束函数:
function [c,ceq] = mycon(x)
c(1)=0.0193*x(3)-x(1);
c(2)=0.00954*x(3)-x(2);
c(3)=750*1728-pi*x(3)^2*x(4)-4*pi*x(3)^3/3;
c(4)=x(4)-240;
c(5)=0.0625-x(1);
c(6)=x(2)-6.1875;
c(7)=10-x(3);
c(7)=x(4)-200;
ceq=[];
end