<< lsqlin Symphony Toolbox qpipopt >>

Symphony Toolbox >> Symphony Toolbox > lsqnonneg

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 double, represents the multiplier of the solution x in the expression C*x - d. Number of columns in C is equal to the number of elements in x.

d :

a vector of double, represents the additive constant term in the expression C*x - d. Number of elements in d is equal to the number of rows in C matrix.

xopt :

a vector of double, 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 double, solution residuals returned as the vector C*x-d.

exitflag :

Integer identifying the reason the algorithm terminated. It could be 0, 1 or 2 i.e. Optimal, Maximum Number of Iterations Exceeded, CPU time exceeded.

output :

Structure containing information about the optimization. This version only contains number of iterations.

lambda :

Structure containing the Lagrange multipliers at the solution x. It contains lower and upper bound multiplier.

Description

Solves nonnegative least-squares curve fitting problems specified by :

The routine calls Ipopt for solving the nonnegative least-squares curve fitting problems, Ipopt is a library written in C++.

Examples

// A basic lsqnonneg problem
C = [
0.0372    0.2869
0.6861    0.7071
0.6233    0.6245
0.6344    0.6170];
d = [
0.8587
0.1781
0.0747
0.8405];
[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d)

Authors


Report an issue
<< lsqlin Symphony Toolbox qpipopt >>