Question: how to use lsqnonneg in matlab?
Answer: x = lsqnonneg(C,d) returns the vector x that minimizes norm(C*x-d) subject to x >= 0 . C and d must be real. x = lsqnonneg(C,d,x0) uses x0 as the starting point if all x0 >= 0 ; otherwise, the default is used.