小弟的MatlAB程序好像有点问题,虽然只是三元方程,但是不知道怎么回事,没有结果,他的提示也不知道什么意思,啦个高手看看function [c,ceq]=mycon(x)c=1-0.7*x(2)+2.1/x(1)-x(2)*x(3);ceq=[];fun='4*x(1)^2*0.5*(x(2)*(1-x(2))*(1-x(3))+1/2*(1-x(2)^2)+(1-x(2)*x(3))*(3/x(1)+(1-x(2)*x(3))/1.4)+x(3)*x(2)*((1-x(2)*x(3))/0.7)+3/x(1)+x(2)*x(3)/1.4)';X0=[10 1 3];lb=[0 0 0]';ub=[200 1 1]';[x,fval]=fmincon(fun,X0,[],[],[],[],lb,ub,@mycon);Warning: Trust-region-reflective algorithm does not solve this type of problem, using active-set algorithm. You could also try the interior-point or sqp algorithms: set the Algorithmoption to 'interior-point' or 'sqp' and rerun. For more help, see Choosing the Algorithm in the documentation. > In fmincon at 472Local minimum found that satisfies the constraints.Optimization completed because the objective function is non-decreasing in feasible directions, to within the default value of the function tolerance,and constraints were satisfied to within the default value of the constraint tolerance.<stopping criteria details>Active inequalities (to within options.TolCon = 1e-006): lower upper ineqlin ineqnonlin 1 2 3
|