summaryrefslogtreecommitdiff
path: root/tests/general_tests/lsqlin/lsqlin_maxiter.sce
diff options
context:
space:
mode:
Diffstat (limited to 'tests/general_tests/lsqlin/lsqlin_maxiter.sce')
-rw-r--r--tests/general_tests/lsqlin/lsqlin_maxiter.sce42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/general_tests/lsqlin/lsqlin_maxiter.sce b/tests/general_tests/lsqlin/lsqlin_maxiter.sce
new file mode 100644
index 0000000..036cf39
--- /dev/null
+++ b/tests/general_tests/lsqlin/lsqlin_maxiter.sce
@@ -0,0 +1,42 @@
+// Check for maxiter
+C = [2 0;
+ -1 1;
+ 0 2]
+d = [1
+ 0
+ -1];
+A = [10 -2;
+ -2 10];
+b = [4
+ -4];
+options = list("MaxIter",1);
+// Output
+//Maximum Number of Iterations Exceeded. Output may not be optimal.
+// lambda =
+//
+// lower: [0x0 constant]
+// upper: [0x0 constant]
+// eqlin: [0x0 constant]
+// ineqlin: [0x0 constant]
+// output =
+//
+// Iterations: 1
+// exitflag =
+//
+// 1
+// residual =
+//
+// 1.0243179
+// 0.3941271
+// - 0.1874278
+// resnorm =
+//
+// 1.2396926
+// xopt =
+//
+// - 0.0121590
+// - 0.4062861
+
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqlin(C,d,A,b,[],[],[],[],[],options)
+
+