lsqnonneg
Solves nonnegative least-squares curve fitting problems.
Calling Sequence
xopt = lsqnonneg(C,d)
xopt = lsqnonneg(C,d,param)
[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg( ... )
Parameters
C :
a matrix of doubles, represents the multiplier of the solution x in the expression C*x - d. C is M-by-N, where M is the number of equations, and N is the number of elements of x.
d :
a vector of doubles, represents the additive constant term in the expression C*x - d. d is M-by-1, where M is the number of equations.
xopt :
a vector of doubles, the computed solution of the optimization problem.
resnorm :
a double, objective value returned as the scalar value norm(C*x-d)^2.
residual :
a vector of doubles, solution residuals returned as the vector C*x-d.
exitflag :
Integer identifying the reason the algorithm terminated.
output :
Structure containing information about the optimization. Right now it contains number of iteration.
lambda :
Structure containing the Lagrange multipliers at the solution x (separated by constraint type).It contains lower, upper and linear equality, inequality constraints.
Description
Solves nonnegative least-squares curve fitting problems specified by :
\begin{eqnarray}
&\mbox{min}_{x}
& 1/2||C*x - d||_2^2 \\
& & x \geq 0 \\
\end{eqnarray}
We are calling IPOpt for solving the nonnegative least-squares curve fitting problems, IPOpt is a library written in C++.
Examples
Authors
Harpreet Singh