summaryrefslogtreecommitdiff
path: root/tests/general_tests/lsqnonneg/lsqnonneg_maxiter.sce
diff options
context:
space:
mode:
Diffstat (limited to 'tests/general_tests/lsqnonneg/lsqnonneg_maxiter.sce')
-rw-r--r--tests/general_tests/lsqnonneg/lsqnonneg_maxiter.sce42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_maxiter.sce b/tests/general_tests/lsqnonneg/lsqnonneg_maxiter.sce
new file mode 100644
index 0000000..fa61c73
--- /dev/null
+++ b/tests/general_tests/lsqnonneg/lsqnonneg_maxiter.sce
@@ -0,0 +1,42 @@
+// 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
+// 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)
+