summaryrefslogtreecommitdiff
path: root/2.3-1/tests
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/tests')
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testfullrf/testfullrf.sci7
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testgivens/testgivens.sci7
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testhess/testhess.sci5
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testhouseholder/testhouseholder.sci6
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testnorm/testnorm.sci6
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testqr/testQR.sci8
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testrowcomp/testrcomp.sci6
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testspec/testspec.sci9
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testsqroot/testsqroot.sci5
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testsva/testsva.sci7
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testsva/testsvatol.sci9
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvd.sci6
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdeconomy.sci11
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdim.sci6
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdrank.sci13
-rw-r--r--2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdreal.sci11
16 files changed, 122 insertions, 0 deletions
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testfullrf/testfullrf.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testfullrf/testfullrf.sci
new file mode 100644
index 00000000..49d3c7a2
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testfullrf/testfullrf.sci
@@ -0,0 +1,7 @@
+function testfullrf()
+ A = [1,2,3;4,5,6;7,8,9]
+ [Q,M,rk] = fullrf(A)
+ disp(Q)
+ disp(M)
+ disp(rk)
+endfunction
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testgivens/testgivens.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testgivens/testgivens.sci
new file mode 100644
index 00000000..3ef0d284
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testgivens/testgivens.sci
@@ -0,0 +1,7 @@
+function testgivens()
+ a = [1]
+ b = [2]
+ [u,c] = givens(a,b)
+ disp(u)
+ disp(c)
+endfunction
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testhess/testhess.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testhess/testhess.sci
new file mode 100644
index 00000000..f991ae9f
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testhess/testhess.sci
@@ -0,0 +1,5 @@
+function testhess()
+ a = [0,0,0,0;0,6,7,8;9,10,11,12;13,14,15,16];
+ h = hess(a)
+ disp(h)
+endfunction
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testhouseholder/testhouseholder.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testhouseholder/testhouseholder.sci
new file mode 100644
index 00000000..30b4c20e
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testhouseholder/testhouseholder.sci
@@ -0,0 +1,6 @@
+function testhouseholder()
+ A = [1;2;3;4;5]
+ B = [6;7;8;9;10]
+ u = householder(A,B)
+ disp(u)
+endfunction
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testnorm/testnorm.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testnorm/testnorm.sci
new file mode 100644
index 00000000..727a895f
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testnorm/testnorm.sci
@@ -0,0 +1,6 @@
+//* Function to find, norm(a,2)
+function testnorm()
+ a = [1,2,3;4,5,6;7,8,9] // Matrix
+ d = norm(a,2); // Calling NORM function.
+ disp(d) // display output
+endfunction
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testqr/testQR.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testqr/testQR.sci
new file mode 100644
index 00000000..292e1cba
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testqr/testQR.sci
@@ -0,0 +1,8 @@
+function testQR()
+ A = [1,2,3;4,5,6]
+ [u,a,rk,e] = qr(A);
+ disp(u)
+ disp(a)
+ disp(rk)
+ disp(e)
+endfunction
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testrowcomp/testrcomp.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testrowcomp/testrcomp.sci
new file mode 100644
index 00000000..f8da9482
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testrowcomp/testrcomp.sci
@@ -0,0 +1,6 @@
+function testrcomp()
+ A = [1,2,3;4,5,6]
+ [u,rk] = rowcomp(A,"qr")
+ disp(u)
+ disp(rk)
+endfunction
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testspec/testspec.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testspec/testspec.sci
new file mode 100644
index 00000000..6e9346d4
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testspec/testspec.sci
@@ -0,0 +1,9 @@
+function testspec()
+ A = [1,2,3;4,5,6;7,8,9]
+ B = [10,11,12;13,14,15;16,17,18]
+ [R,diagevals,c,d] = spec(A,B)
+ disp(R)
+ disp(diagevals)
+ disp(c)
+ disp(d)
+endfunction
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testsqroot/testsqroot.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testsqroot/testsqroot.sci
new file mode 100644
index 00000000..63db1f49
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testsqroot/testsqroot.sci
@@ -0,0 +1,5 @@
+function testsqroot()
+ a = [1,2,3;4,5,6;7,8,9];
+ e = sqroot(a);
+ disp(e)
+endfunction
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testsva/testsva.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testsva/testsva.sci
new file mode 100644
index 00000000..c7107236
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testsva/testsva.sci
@@ -0,0 +1,7 @@
+function testsva()
+ a = [1,2,3,4;5,6,7,8;9,10,11,12]
+ [u,s,v] = sva(a)
+ disp(u)
+ disp(s)
+ disp(v)
+endfunction
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testsva/testsvatol.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testsva/testsvatol.sci
new file mode 100644
index 00000000..b199ec36
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testsva/testsvatol.sci
@@ -0,0 +1,9 @@
+// function Singular Value Approx.
+
+function testsvatol()
+ a = [1,2,3,4;5,6,7,8;9,10,11,12]
+ [u,s,v] = sva(a,1)
+ disp(u)
+ disp(s)
+ disp(v)
+endfunction
diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvd.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvd.sci
new file mode 100644
index 00000000..9a3a50a6
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/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/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdeconomy.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdeconomy.sci
new file mode 100644
index 00000000..0459c790
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/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/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdim.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdim.sci
new file mode 100644
index 00000000..16633cce
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/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/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdrank.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdrank.sci
new file mode 100644
index 00000000..108acde8
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/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/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdreal.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdreal.sci
new file mode 100644
index 00000000..0e68e003
--- /dev/null
+++ b/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/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