From 59190035a74ebad7543660d54fa4e89cf24d8e6f Mon Sep 17 00:00:00 2001 From: Sandeep Gupta Date: Fri, 7 Jul 2017 13:09:29 +0530 Subject: Demo-updated --- tests/unit_tests/testLinearAlgebra/test_svd/testsvd.sci | 6 ++++++ .../testLinearAlgebra/test_svd/testsvdeconomy.sci | 11 +++++++++++ tests/unit_tests/testLinearAlgebra/test_svd/testsvdim.sci | 6 ++++++ tests/unit_tests/testLinearAlgebra/test_svd/testsvdrank.sci | 13 +++++++++++++ tests/unit_tests/testLinearAlgebra/test_svd/testsvdreal.sci | 11 +++++++++++ tests/unit_tests/testLinearAlgebra/testsvd/testsvd.sci | 6 ------ .../unit_tests/testLinearAlgebra/testsvd/testsvdeconomy.sci | 11 ----------- tests/unit_tests/testLinearAlgebra/testsvd/testsvdim.sci | 6 ------ tests/unit_tests/testLinearAlgebra/testsvd/testsvdrank.sci | 13 ------------- tests/unit_tests/testLinearAlgebra/testsvd/testsvdreal.sci | 11 ----------- 10 files changed, 47 insertions(+), 47 deletions(-) create mode 100644 tests/unit_tests/testLinearAlgebra/test_svd/testsvd.sci create mode 100644 tests/unit_tests/testLinearAlgebra/test_svd/testsvdeconomy.sci create mode 100644 tests/unit_tests/testLinearAlgebra/test_svd/testsvdim.sci create mode 100644 tests/unit_tests/testLinearAlgebra/test_svd/testsvdrank.sci create mode 100644 tests/unit_tests/testLinearAlgebra/test_svd/testsvdreal.sci delete mode 100644 tests/unit_tests/testLinearAlgebra/testsvd/testsvd.sci delete mode 100644 tests/unit_tests/testLinearAlgebra/testsvd/testsvdeconomy.sci delete mode 100644 tests/unit_tests/testLinearAlgebra/testsvd/testsvdim.sci delete mode 100644 tests/unit_tests/testLinearAlgebra/testsvd/testsvdrank.sci delete mode 100644 tests/unit_tests/testLinearAlgebra/testsvd/testsvdreal.sci (limited to 'tests/unit_tests') diff --git a/tests/unit_tests/testLinearAlgebra/test_svd/testsvd.sci b/tests/unit_tests/testLinearAlgebra/test_svd/testsvd.sci new file mode 100644 index 0000000..c5da4cd --- /dev/null +++ b/tests/unit_tests/testLinearAlgebra/test_svd/testsvd.sci @@ -0,0 +1,6 @@ +function testsvd() + disp(" ** SVD Function (Singular Value Decomposition)** ") + A = [1,2,3,11;4,5,6,12;7,8,9,13] // Matrix - A + s = svd(A) // Calling Function Sequence + disp(s) +endfunction diff --git a/tests/unit_tests/testLinearAlgebra/test_svd/testsvdeconomy.sci b/tests/unit_tests/testLinearAlgebra/test_svd/testsvdeconomy.sci new file mode 100644 index 0000000..0459c79 --- /dev/null +++ b/tests/unit_tests/testLinearAlgebra/test_svd/testsvdeconomy.sci @@ -0,0 +1,11 @@ +function testsvdeconomy() + disp(" ** SVD Function (Singular Value Decomposition)** ") + A = [1,2,3,11;4,5,6,12;7,8,9,13] // Matrix - A + [u,s,vt] = svd(A,'e') // Calling Function Sequence + disp("U Matrix") + disp(u) // A = U*sigma*Vt + disp("Sigma Matrix") + disp(s) + disp(" V transpose ") + disp(vt) +endfunction diff --git a/tests/unit_tests/testLinearAlgebra/test_svd/testsvdim.sci b/tests/unit_tests/testLinearAlgebra/test_svd/testsvdim.sci new file mode 100644 index 0000000..16633cc --- /dev/null +++ b/tests/unit_tests/testLinearAlgebra/test_svd/testsvdim.sci @@ -0,0 +1,6 @@ +// Function double_complex - test data. +function svdim() + b = [ (5.91+5.69*%i),(3.15-4.08*%i),(4.89+4.20*%i),(7.09+2.72*%i);(1.89+3.27*%i),(4.10+6.70*%i),(7.78+4.06*%i),(4.57+2.07*%i);(3.28+3.84*%i),(-0.79+7.21*%i),(3.88+3.30*%i),(3.84+1.19*%i)] + s = svd(b) + disp(s) +endfunction diff --git a/tests/unit_tests/testLinearAlgebra/test_svd/testsvdrank.sci b/tests/unit_tests/testLinearAlgebra/test_svd/testsvdrank.sci new file mode 100644 index 0000000..108acde --- /dev/null +++ b/tests/unit_tests/testLinearAlgebra/test_svd/testsvdrank.sci @@ -0,0 +1,13 @@ +function testsvdrank() + disp(" ** SVD Function (Singular Value Decomposition)** ") + A = [1,2,3,11;4,5,6,12;7,8,9,13] // Matrix - A + [u,s,vt,rk] = svd(A) // Calling Function Sequence + disp("U Matrix") + disp(u) // A = U*sigma*Vt + disp("Sigma Matrix") + disp(s) + disp(" V transpose ") + disp(vt) + disp("Rank") + disp(rk) +endfunction diff --git a/tests/unit_tests/testLinearAlgebra/test_svd/testsvdreal.sci b/tests/unit_tests/testLinearAlgebra/test_svd/testsvdreal.sci new file mode 100644 index 0000000..0e68e00 --- /dev/null +++ b/tests/unit_tests/testLinearAlgebra/test_svd/testsvdreal.sci @@ -0,0 +1,11 @@ +function testsvdreal() + disp(" ** SVD Function (Singular Value Decomposition)** ") + A = [1,2,3,11;4,5,6,12;7,8,9,13] // Matrix - A + [u,s,vt] = svd(A) // Calling Function Sequence + disp("U Matrix") + disp(u) // A = U*sigma*Vt + disp("Sigma Matrix") + disp(s) + disp(" V transpose ") + disp(vt) +endfunction diff --git a/tests/unit_tests/testLinearAlgebra/testsvd/testsvd.sci b/tests/unit_tests/testLinearAlgebra/testsvd/testsvd.sci deleted file mode 100644 index 9a3a50a..0000000 --- a/tests/unit_tests/testLinearAlgebra/testsvd/testsvd.sci +++ /dev/null @@ -1,6 +0,0 @@ -function testsvd() - disp(" ** SVD Function (Singular Value Decomposition)** ") - A = [1,2,3,11;4,5,6,12;7,8,9,13] // Matrix - A - [s = svd(A) // Calling Function Sequence - disp(s) -endfunction diff --git a/tests/unit_tests/testLinearAlgebra/testsvd/testsvdeconomy.sci b/tests/unit_tests/testLinearAlgebra/testsvd/testsvdeconomy.sci deleted file mode 100644 index 0459c79..0000000 --- a/tests/unit_tests/testLinearAlgebra/testsvd/testsvdeconomy.sci +++ /dev/null @@ -1,11 +0,0 @@ -function testsvdeconomy() - disp(" ** SVD Function (Singular Value Decomposition)** ") - A = [1,2,3,11;4,5,6,12;7,8,9,13] // Matrix - A - [u,s,vt] = svd(A,'e') // Calling Function Sequence - disp("U Matrix") - disp(u) // A = U*sigma*Vt - disp("Sigma Matrix") - disp(s) - disp(" V transpose ") - disp(vt) -endfunction diff --git a/tests/unit_tests/testLinearAlgebra/testsvd/testsvdim.sci b/tests/unit_tests/testLinearAlgebra/testsvd/testsvdim.sci deleted file mode 100644 index 16633cc..0000000 --- a/tests/unit_tests/testLinearAlgebra/testsvd/testsvdim.sci +++ /dev/null @@ -1,6 +0,0 @@ -// Function double_complex - test data. -function svdim() - b = [ (5.91+5.69*%i),(3.15-4.08*%i),(4.89+4.20*%i),(7.09+2.72*%i);(1.89+3.27*%i),(4.10+6.70*%i),(7.78+4.06*%i),(4.57+2.07*%i);(3.28+3.84*%i),(-0.79+7.21*%i),(3.88+3.30*%i),(3.84+1.19*%i)] - s = svd(b) - disp(s) -endfunction diff --git a/tests/unit_tests/testLinearAlgebra/testsvd/testsvdrank.sci b/tests/unit_tests/testLinearAlgebra/testsvd/testsvdrank.sci deleted file mode 100644 index 108acde..0000000 --- a/tests/unit_tests/testLinearAlgebra/testsvd/testsvdrank.sci +++ /dev/null @@ -1,13 +0,0 @@ -function testsvdrank() - disp(" ** SVD Function (Singular Value Decomposition)** ") - A = [1,2,3,11;4,5,6,12;7,8,9,13] // Matrix - A - [u,s,vt,rk] = svd(A) // Calling Function Sequence - disp("U Matrix") - disp(u) // A = U*sigma*Vt - disp("Sigma Matrix") - disp(s) - disp(" V transpose ") - disp(vt) - disp("Rank") - disp(rk) -endfunction diff --git a/tests/unit_tests/testLinearAlgebra/testsvd/testsvdreal.sci b/tests/unit_tests/testLinearAlgebra/testsvd/testsvdreal.sci deleted file mode 100644 index 0e68e00..0000000 --- a/tests/unit_tests/testLinearAlgebra/testsvd/testsvdreal.sci +++ /dev/null @@ -1,11 +0,0 @@ -function testsvdreal() - disp(" ** SVD Function (Singular Value Decomposition)** ") - A = [1,2,3,11;4,5,6,12;7,8,9,13] // Matrix - A - [u,s,vt] = svd(A) // Calling Function Sequence - disp("U Matrix") - disp(u) // A = U*sigma*Vt - disp("Sigma Matrix") - disp(s) - disp(" V transpose ") - disp(vt) -endfunction -- cgit