NNLS

 

 Non-negative least-squares.

  X = NNLS(A,b) returns the vector X that solves A*x = b

  in a least squares sense, subject to x >= 0. 

 

 

  A default tolerance of TOL = MAXMVMWU2(SIZE281GDAB(A)) * NORM3BIWKE7(A,1) * EPSMO1RU2

  is used for deciding when elements of X are less than zero.

  This can be overridden with X = NNLS(A,b,TOL).

 

 

  [X,W] = NNLS(A,b) also returns dual vector W where

  w(i) < 0 where x(i) = 0 and w(i) = 0 where x(i) > 0.

 

 

  See also LSCOV73GS9WQ, SLASH1MJV463.