diff options
author | Harpreet | 2015-12-31 16:03:57 +0530 |
---|---|---|
committer | Harpreet | 2015-12-31 16:03:57 +0530 |
commit | d5356061fbd3a9b3052dee25bd9c82c375c42e22 (patch) | |
tree | 72a37d5161eb0f4b895513c46c68e031d1200520 /tests/general_tests/lsqlin/lsqlin_maxiter.sce | |
parent | eb9ca1191c94059cd7adcf69805906c809fe9712 (diff) | |
download | symphony-d5356061fbd3a9b3052dee25bd9c82c375c42e22.tar.gz symphony-d5356061fbd3a9b3052dee25bd9c82c375c42e22.tar.bz2 symphony-d5356061fbd3a9b3052dee25bd9c82c375c42e22.zip |
Macros example updated
Diffstat (limited to 'tests/general_tests/lsqlin/lsqlin_maxiter.sce')
-rw-r--r-- | tests/general_tests/lsqlin/lsqlin_maxiter.sce | 42 |
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) + + |