From eecd667c2f6ad705cb56fa0c8718b4ab37ac92d5 Mon Sep 17 00:00:00 2001 From: Sandeep Gupta Date: Fri, 7 Jul 2017 01:57:31 +0530 Subject: SVA Function --- jar/scilab_en_US_help.jar | Bin 90519 -> 90519 bytes src/c/linearAlgebra/svd/zsvda.c | 1 + .../testLinearAlgebra/testsva/testsva.sci | 7 +++++++ .../testLinearAlgebra/testsva/testsvatol.sci | 9 +++++++++ 4 files changed, 17 insertions(+) create mode 100644 tests/unit_tests/testLinearAlgebra/testsva/testsva.sci create mode 100644 tests/unit_tests/testLinearAlgebra/testsva/testsvatol.sci diff --git a/jar/scilab_en_US_help.jar b/jar/scilab_en_US_help.jar index 665fdd33..da5ed420 100644 Binary files a/jar/scilab_en_US_help.jar and b/jar/scilab_en_US_help.jar differ diff --git a/src/c/linearAlgebra/svd/zsvda.c b/src/c/linearAlgebra/svd/zsvda.c index 12a07aaf..c75cc50c 100644 --- a/src/c/linearAlgebra/svd/zsvda.c +++ b/src/c/linearAlgebra/svd/zsvda.c @@ -19,6 +19,7 @@ #include "matrixTranspose.h" #include "conj.h" +/* Lapack functions used . */ extern doubleComplex zgesvd_( char* , char* , int* , int* ,doubleComplex *,\ int* , double* ,doubleComplex* , int* ,doubleComplex* , int* ,\ doubleComplex* , int* , double* , int* ); diff --git a/tests/unit_tests/testLinearAlgebra/testsva/testsva.sci b/tests/unit_tests/testLinearAlgebra/testsva/testsva.sci new file mode 100644 index 00000000..c7107236 --- /dev/null +++ b/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/tests/unit_tests/testLinearAlgebra/testsva/testsvatol.sci b/tests/unit_tests/testLinearAlgebra/testsva/testsvatol.sci new file mode 100644 index 00000000..b199ec36 --- /dev/null +++ b/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 -- cgit