% -*- texinfo -*- % @deftypefn {Function File} {[@var{x}, @var{obj}, @var{info}, @var{lambda}] =} qp (@var{x0}, @var{H}, @var{q}, @var{A}, @var{b}, @var{lb}, @var{ub}, @var{A_lb}, @var{A_in}, @var{A_ub}) % Solve the quadratic program % @tex % $$ % \min_x {1 \over 2} x^T H x + x^T q % $$ % @end tex % @ifnottex % % @example % @group % min 0.5 x'*H*x + x'*q % x % @end group % @end example % % @end ifnottex % subject to % @tex % $$ % Ax = b \qquad lb \leq x \leq ub \qquad A_{lb} \leq A_{in} \leq A_{ub} % $$ % @end tex % @ifnottex % % @example % @group % A*x = b % lb <= x <= ub % A_lb <= A_in*x <= A_ub % @end group % @end example % @end ifnottex % % @noindent % using a null-space active-set method. % % Any bound (@var{A}, @var{b}, @var{lb}, @var{ub}, @var{A_lb}, % @var{A_ub}) may be set to the empty matrix (@code{[]}) if not % present. If the initial guess is feasible the algorithm is faster. % % The value @var{info} is a structure with the following fields: % @table @code % @item solveiter % The number of iterations required to find the solution. % @item info % An integer indicating the status of the solution, as follows: % @table @asis % @item 0 % The problem is feasible and convex. Global solution found. % @item 1 % The problem is not convex. Local solution found. % @item 2 % The problem is not convex and unbounded. % @item 3 % Maximum number of iterations reached. % @item 6 % The problem is infeasible. % @end table % @end table % @end deftypefn