fmincon attempts to solve problems of the form:
min F(X) subject to: A*X <= B, Aeq*X = Beq (linear constraints)
X C(X) <= 0, Ceq(X) = 0 (nonlinear constraints)
LB <= X <= UB (bounds)
fmincon implements four different algorithms: interior point, SQP, active
set, and trust region reflective. Choose one via the option Algorithm:
for instance, to choose SQP, set OPTIONS = optimset('Algorithm','sqp'),
and then pass OPTIONS to fmincon.
可以看出它有四种算法。使用help fmincon看看就知道了!
在其options中有算法说明,分别为:
'interior-point', 'active-set', or the default, 'trust-region-reflective'.
可以按照要求进行处理
你的代码中调用fmincon函数中@total1不应该是@myfun目标函数吗,后面的那个[c,ceq] = mycon(x) c(1)=350-163*x^(-2.86)*x(3)^0.86; c,