summaryrefslogtreecommitdiff
path: root/demos/lsqnonneg.dem.sce
blob: d8be39b86786310486d97938b53003abe7eda952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mode(1)
//
// Demo of lsqnonneg.sci
//

// A basic lsqnonneg problem
C = [1 1 1;
1 1 0;
0 1 1;
1 0 0;
0 0 1]
d = [89;
67;
53;
35;
20;]
[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d)
//========= E N D === O F === D E M O =========//