summaryrefslogtreecommitdiff
path: root/tests/unit_tests/test_jacobi/scilabcode
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-07-10 22:08:27 +0530
committerAbhinav Dronamraju2017-07-10 22:08:27 +0530
commitd2c00f5343785085bcfefb62cbc041a5cffa8f31 (patch)
tree3d4fc371c30f2340af2def6dcabeb4fd4821eaf8 /tests/unit_tests/test_jacobi/scilabcode
parentc7d123014c05daaa6c7ce32bc5e86e5f3e7e4692 (diff)
parent49d8281d2da2f4c6bf0e62d148a8a7328d3bf970 (diff)
downloadScilab2C_fossee_old-d2c00f5343785085bcfefb62cbc041a5cffa8f31.tar.gz
Scilab2C_fossee_old-d2c00f5343785085bcfefb62cbc041a5cffa8f31.tar.bz2
Scilab2C_fossee_old-d2c00f5343785085bcfefb62cbc041a5cffa8f31.zip
Pulled from upstream master
Diffstat (limited to 'tests/unit_tests/test_jacobi/scilabcode')
-rw-r--r--tests/unit_tests/test_jacobi/scilabcode/main.sci18
-rw-r--r--tests/unit_tests/test_jacobi/scilabcode/modktest.sci5
-rw-r--r--tests/unit_tests/test_jacobi/scilabcode/modsntest.sci6
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/unit_tests/test_jacobi/scilabcode/main.sci b/tests/unit_tests/test_jacobi/scilabcode/main.sci
new file mode 100644
index 0000000..ee229eb
--- /dev/null
+++ b/tests/unit_tests/test_jacobi/scilabcode/main.sci
@@ -0,0 +1,18 @@
+// Demo function to test %sn and %k functions
+// %sn is the Jacobi's elliptic function
+// %k is the Jacobi's complete integral
+function main()
+ u=[1+2*%i 2+3*%i 3+1*%i]; // the corresponding complex vector
+ k=0.6; // parameter of elliptic integral
+ [out]=%sn(u,k);
+ disp(out);
+ m=[0.1 0.2 0.3]; // parametrt of Jacobi complete integral
+ s=%k(m);
+ disp(s);
+endfunction
+
+//Output
+//for %sn
+// 1.5641568 - 0.2037920i 1.0580372 + 0.0100213i 1.1386855 - 0.4631921i
+// for %k
+// 1.6124413 1.6596236 1.7138894
diff --git a/tests/unit_tests/test_jacobi/scilabcode/modktest.sci b/tests/unit_tests/test_jacobi/scilabcode/modktest.sci
new file mode 100644
index 0000000..613cd33
--- /dev/null
+++ b/tests/unit_tests/test_jacobi/scilabcode/modktest.sci
@@ -0,0 +1,5 @@
+function modktest()
+ m=[0.1 0.2 0.3];
+ s=%k(m);
+ disp(s);
+endfunction
diff --git a/tests/unit_tests/test_jacobi/scilabcode/modsntest.sci b/tests/unit_tests/test_jacobi/scilabcode/modsntest.sci
new file mode 100644
index 0000000..dc5d435
--- /dev/null
+++ b/tests/unit_tests/test_jacobi/scilabcode/modsntest.sci
@@ -0,0 +1,6 @@
+function modsntest()
+ u=[1+2*%i 2+3*%i 3+1*%i]; // the corresponding complex vector
+ k=0.6; // parameter of elliptic integral
+ [out]=%sn(u,k);
+ disp(out);
+endfunction