Function Help: mcpsolve View code for mcpsolve Function Reference
  mcpsolve solves a mixed complementarity problem
  mcpsolve is a reimplementation of the Fackler and Miranda's solver
  ncpsolve. mcpsolve adopts the standard convention for MCP problem, follows the
  convention of MATLAB optimization functions, and allows to solve array of
  X = mcpsolve(F,X0) tries to solve the system of nonlinear equations F(X)=0 and
  starts at the vector X0. F accepts a vector X and return a vector F of equation
  values F evaluated at X and, as second output if required, a matrix J, the
  Jacobian evaluated at X.
  X = mcpsolve(F,X0,LB,UB) solves the mixed complementarity problem of the form:
  LB =X     =>   F(X)>0,
  LB<=X<=UB =>   F(X)=0,
      X =UB =>   F(X)<0.
  [X,FVAL] = mcpsolve(F,X0,...) returns the value of the equations F at X.
  [X,FVAL,EXITFLAG] = mcpsolve(F,X0,...) returns EXITFLAG that describes the exit
  conditions. Possible values are
       1         : mcpsolve converged to a root
       0         : Too many iterations
  [X,FVAL,EXITFLAG,OUTPUT] = mcpsolve(F,X0,...) returns the structure OUTPUT
  that contains the number of function evaluations (OUTPUT.funcCount) and the
  number of iterations (OUTPUT.iterations).
  [X,FVAL,EXITFLAG,OUTPUT,JACOBIAN] = mcpsolve(F,X0,...) returns JACOBIAN the
  Jacobian of F evaluated at X.