From dad86bd42cdc2a0e56df9e0591879e5d26fd56fa Mon Sep 17 00:00:00 2001 From: Harpreet Date: Tue, 5 Jan 2016 12:22:43 +0530 Subject: constrviolation and licence file added --- .../general_tests/lsqnonneg/lsqnonneg_logical1.sce | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tests/general_tests/lsqnonneg/lsqnonneg_logical1.sce (limited to 'tests/general_tests/lsqnonneg/lsqnonneg_logical1.sce') diff --git a/tests/general_tests/lsqnonneg/lsqnonneg_logical1.sce b/tests/general_tests/lsqnonneg/lsqnonneg_logical1.sce new file mode 100644 index 0000000..b151d73 --- /dev/null +++ b/tests/general_tests/lsqnonneg/lsqnonneg_logical1.sce @@ -0,0 +1,43 @@ +// An example with C and d as input +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: [5.131D-09,5.546D-09,8.739D-09] +// upper: [0,0,0] +// output = +// +// Iterations: 7 +// ConstrViolation: 0 +// exitflag = +// +// 0 +// residual = +// +// 0.75 +// - 0.625 +// - 0.125 +// - 0.125 +// - 0.625 +// resnorm = +// +// 1.375 +// xopt = +// +// 35.125 +// 32.5 +// 20.625 + +[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d) + -- cgit