急求:请问fmincon优化函数中非线性约束
请问一下各位高手,如果函数中有很多非线性约束应该怎么表示啊比如:x(1)*x(2)-x(3)=0
x(4)*x(5)-x(6)=0
谢谢啊!急啊!请知道的帮帮忙吧! 看 help fmincon 里面很清楚 copy from matlab help
nonlcon
The function that computes the nonlinear inequality constraints c(x)<= 0 and the nonlinear equality constraints ceq(x) = 0. The function nonlcon accepts a vector x and returns two vectors c and ceq. The vector c contains the nonlinear inequalities evaluated at x, and ceq contains the nonlinear equalities evaluated at x. The function nonlcon can be specified as a function handle.
x = fmincon(@myfun,x0,A,b,Aeq,beq,lb,ub,@mycon)
where mycon is a MATLAB function such as
function = mycon(x)
c = ... % Compute nonlinear inequalities at x.
ceq = ... % Compute nonlinear equalities at x
页:
[1]