summaryrefslogtreecommitdiff
path: root/tests/general_tests/lsqnonneg/lsqnonneg_logical.sce
diff options
context:
space:
mode:
Diffstat (limited to 'tests/general_tests/lsqnonneg/lsqnonneg_logical.sce')
-rw-r--r--tests/general_tests/lsqnonneg/lsqnonneg_logical.sce42
1 files changed, 22 insertions, 20 deletions
diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_logical.sce b/tests/general_tests/lsqnonneg/lsqnonneg_logical.sce
index 15106f0..5f59f8c 100644
--- a/tests/general_tests/lsqnonneg/lsqnonneg_logical.sce
+++ b/tests/general_tests/lsqnonneg/lsqnonneg_logical.sce
@@ -1,40 +1,42 @@
// An example with C and d as input
-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];
+C = [1 1 1;
+ 1 1 0;
+ 0 1 1;
+ 1 0 0;
+ 0 0 1]
+d = [89;
+ 67;
+ 53;
+ 35;
+ 20]
//Output
//Optimal Solution Found.
// lambda =
//
-// lower: [0.1506118,1.441D-11]
-// upper: [0,0]
+// lower: [5.131D-09,5.546D-09,8.739D-09]
+// upper: [0,0,0]
// output =
//
-// Iterations: 5
+// Iterations: 7
// exitflag =
//
// 0
// residual =
//
-// 0.6598971
-// - 0.3118739
-// - 0.3580375
-// 0.4129595
+// 0.75
+// - 0.625
+// - 0.125
+// - 0.125
+// - 0.625
// resnorm =
//
-// 0.8314560
+// 1.375
// xopt =
//
-// 0.
-// 0.6929344
+// 35.125
+// 32.5
+// 20.625
[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d)