blob: cbafee5507ddab4cfe444f11ac0eab9d140bd879 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// Check for maxiter
C = [1 1 1;
1 1 0;
0 1 1;
1 0 0;
0 0 1]
d = [89;
67;
53;
35;
20]
options = list("MaxIter",1)
//Output
//Maximum Number of Iterations Exceeded. Output may not be optimal.
// lambda =
//
// lower: [0x0 constant]
// upper: [0x0 constant]
// output =
//
// Iterations: 1
// ConstrViolation: 0
// exitflag =
//
// 1
// residual =
//
// 83.449663
// 63.182327
// 49.319768
// 33.129895
// 18.267336
// resnorm =
//
// 14819.578
// xopt =
//
// 1.8701046
// 1.9475681
// 1.7326638
[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d,options)
|