From d5356061fbd3a9b3052dee25bd9c82c375c42e22 Mon Sep 17 00:00:00 2001 From: Harpreet Date: Thu, 31 Dec 2015 16:03:57 +0530 Subject: Macros example updated --- tests/general_tests/lsqlin/lsqlin_maxiter.sce | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 tests/general_tests/lsqlin/lsqlin_maxiter.sce (limited to 'tests/general_tests/lsqlin/lsqlin_maxiter.sce') 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) + + -- cgit