summaryrefslogtreecommitdiff
path: root/demos/lsqnonneg.dem.sce
blob: 73fa6df4b56a4c85404105489afedf816575108a (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 = [
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)
//========= E N D === O F === D E M O =========//