summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-08-10 20:33:46 +0530
committerAbhinav Dronamraju2017-08-10 20:33:46 +0530
commit5b728d8239b1a1f4467e2485d54c7ed7db1d4f11 (patch)
treed8db631e058bae294362b2087079150569fc9581 /demos
parent6422b5c0a45161d6571fd6d7077b6d551cbb5e26 (diff)
parent4bc007e5b44a13b582b0275bf7fc6693942ba2ac (diff)
downloadScilab2C_fossee_old-5b728d8239b1a1f4467e2485d54c7ed7db1d4f11.tar.gz
Scilab2C_fossee_old-5b728d8239b1a1f4467e2485d54c7ed7db1d4f11.tar.bz2
Scilab2C_fossee_old-5b728d8239b1a1f4467e2485d54c7ed7db1d4f11.zip
Merge and functions added
Diffstat (limited to 'demos')
-rw-r--r--demos/Brijesh_Demos/test_beta.sci12
-rw-r--r--demos/Brijesh_Demos/test_center.sci14
-rw-r--r--demos/Brijesh_Demos/test_correl.sci32
-rw-r--r--demos/Brijesh_Demos/test_covar.sci20
-rw-r--r--demos/Brijesh_Demos/test_gamma.sci10
-rw-r--r--demos/Brijesh_Demos/test_gammaln.sci10
-rw-r--r--demos/Brijesh_Demos/test_isinf.sci6
-rw-r--r--demos/Brijesh_Demos/test_ndgrid.sci20
-rw-r--r--demos/Brijesh_Demos/test_range.sci8
-rw-r--r--demos/Brijesh_Demos/test_sind.sci10
-rw-r--r--demos/Brijesh_Demos/test_tand.sci10
-rw-r--r--demos/Brijesh_Demos/test_wcenter.sci14
12 files changed, 166 insertions, 0 deletions
diff --git a/demos/Brijesh_Demos/test_beta.sci b/demos/Brijesh_Demos/test_beta.sci
new file mode 100644
index 0000000..a5465a7
--- /dev/null
+++ b/demos/Brijesh_Demos/test_beta.sci
@@ -0,0 +1,12 @@
+function test_beta
+ disp('Datatype: Double');
+ i1 = [1 2 3; 4 5 6];
+ i2 = [7 8 9; 10 11 12];
+ o1 = beta(i1,i2);
+ disp(o1);
+ disp('Datatype: float');
+ i3 = float([1 2 3; 4 5 6]);
+ i4 = float([7 8 9; 10 11 12]);
+ o2 = beta(i3,i4);
+ disp(o2);
+endfunction
diff --git a/demos/Brijesh_Demos/test_center.sci b/demos/Brijesh_Demos/test_center.sci
new file mode 100644
index 0000000..9281580
--- /dev/null
+++ b/demos/Brijesh_Demos/test_center.sci
@@ -0,0 +1,14 @@
+function test_center
+ disp('Datatype: Double');
+ i1 = [1 2 3; 4 5 6];
+ o1 = center(i1);
+ disp(o1);
+ disp('Datatype: float');
+ i2 = float([1 2 3; 4 5 6]);
+ o2 = center(i2);
+ disp(o2);
+ disp('Datatype: Double Complex');
+ i3 = [0 %i 3+%i; 4 5*%i 0];
+ o3 = center(i3);
+ disp(o3);
+endfunction
diff --git a/demos/Brijesh_Demos/test_correl.sci b/demos/Brijesh_Demos/test_correl.sci
new file mode 100644
index 0000000..80a09a0
--- /dev/null
+++ b/demos/Brijesh_Demos/test_correl.sci
@@ -0,0 +1,32 @@
+function test_correl
+ disp('Datatype: Double');
+ i1 = [1 2 3 4 5 6];
+ i2 = [1 2 3 3 5 6];
+ o1 = correl(i1,i2);
+ disp(o1);
+ i3 = [1 2 3 4 5 6];
+ i4 = [1 2];
+ fre = [1 2 ;3 4; 5 6; 7 8; 9 1; 2 3];
+ o2 = correl(i3,i4,fre);
+ disp(o2);
+ disp('Datatype: float');
+ i5 = float([1 2 3 4 5 6]);
+ i6 = float([1 2 3 3 5 6]);
+ o3 = correl(i5,i6);
+ disp(o3);
+ i7 = float([1 2 3 4 5 6]);
+ i8 = float([1 2]);
+ ffre = float([1 2 ;3 4; 5 6; 7 8; 9 1; 2 3]);
+ o4 = correl(i7,i8,ffre);
+ disp(o4);
+ disp('Datatype: DoubleComplex');
+ i9 = [1 2 %i 4 6+6*%i 5];
+ i10 = [0 %i 1 4 8*%i 2];
+ o5 = correl(i9,i10);
+ disp(o5);
+ i11 = [1 2 %i 4 6+6*%i 5];
+ i12 = [1 %i];
+ zfre = [1 %i ;3 0; 5 6*%i; 7 8; 9 1; 2 3];
+ o6 = correl(i11,i12,zfre);
+ disp(o6);
+endfunction
diff --git a/demos/Brijesh_Demos/test_covar.sci b/demos/Brijesh_Demos/test_covar.sci
new file mode 100644
index 0000000..b182532
--- /dev/null
+++ b/demos/Brijesh_Demos/test_covar.sci
@@ -0,0 +1,20 @@
+function test_covar
+ disp('Datatype: Double');
+ i3 = [1 2 3 4 5 6];
+ i4 = [1 2];
+ fre = [1 2 ;3 4; 5 6; 7 8; 9 1; 2 3];
+ o2 = covar(i3,i4,fre);
+ disp(o2);
+ disp('Datatype: float');
+ i7 = float([1 2 3 4 5 6]);
+ i8 = float([1 2]);
+ ffre = float([1 2 ;3 4; 5 6; 7 8; 9 1; 2 3]);
+ o4 = covar(i7,i8,ffre);
+ disp(o4);
+ disp('Datatype: DoubleComplex');
+ i11 = [1 2 %i 4 6+6*%i 5];
+ i12 = [1 %i];
+ zfre = [1 %i ;3 0; 5 6*%i; 7 8; 9 1; 2 3];
+ o6 = covar(i11,i12,zfre);
+ disp(o6);
+endfunction
diff --git a/demos/Brijesh_Demos/test_gamma.sci b/demos/Brijesh_Demos/test_gamma.sci
new file mode 100644
index 0000000..4ca5f02
--- /dev/null
+++ b/demos/Brijesh_Demos/test_gamma.sci
@@ -0,0 +1,10 @@
+function test_gamma
+ disp('Datatype: Double');
+ i1 = [1 2 3; 4 5 6];
+ o1 = gamma(i1);
+ disp(o1);
+ disp('Datatype: float');
+ i2 = float([1 2 3; 4 5 6]);
+ o2 = gamma(i2);
+ disp(o2);
+endfunction
diff --git a/demos/Brijesh_Demos/test_gammaln.sci b/demos/Brijesh_Demos/test_gammaln.sci
new file mode 100644
index 0000000..a12a57b
--- /dev/null
+++ b/demos/Brijesh_Demos/test_gammaln.sci
@@ -0,0 +1,10 @@
+function test_gammaln
+ disp('Datatype: Double');
+ i1 = [1 2 3; 4 5 6];
+ o1 = gammaln(i1);
+ disp(o1);
+ disp('Datatype: float');
+ i2 = float([1 2 3; 4 5 6]);
+ o2 = gammaln(i2);
+ disp(o2);
+endfunction
diff --git a/demos/Brijesh_Demos/test_isinf.sci b/demos/Brijesh_Demos/test_isinf.sci
new file mode 100644
index 0000000..59be975
--- /dev/null
+++ b/demos/Brijesh_Demos/test_isinf.sci
@@ -0,0 +1,6 @@
+function test_isinf
+ disp('Datatype: Double');
+ i1 = %inf;
+ o1 = isinf(float(i1));
+ disp(o1);
+endfunction
diff --git a/demos/Brijesh_Demos/test_ndgrid.sci b/demos/Brijesh_Demos/test_ndgrid.sci
new file mode 100644
index 0000000..79f9a5d
--- /dev/null
+++ b/demos/Brijesh_Demos/test_ndgrid.sci
@@ -0,0 +1,20 @@
+function test_ndgrid
+ disp('Datatype: Double');
+ i1 = linspace(-1,1,10);
+ i2 = linspace(-1,1,3);
+ [o1, o2] = ndgrid(i1,i2);
+ disp(o1);
+ disp(o2);
+ disp('Datatype: float');
+ i3 = linspace(-1,1,10);
+ i4 = linspace(-1,1,3);
+ [o3, o4] = ndgrid(float(i3),float(i4));
+ disp(o3);
+ disp(o4);
+ disp('Datatype: Double Complex');
+ i5 = [1 %i 3];
+ i6 = [%i 3+%i 5*%i 9 7 0];
+ [o5, o6] = ndgrid(i5,i6);
+ disp(o5);
+ disp(o6);
+endfunction
diff --git a/demos/Brijesh_Demos/test_range.sci b/demos/Brijesh_Demos/test_range.sci
new file mode 100644
index 0000000..beca7a1
--- /dev/null
+++ b/demos/Brijesh_Demos/test_range.sci
@@ -0,0 +1,8 @@
+function test_range
+ disp('Datatype: Double');
+ i1 = [1 2 3; 4 5 6; 7 8 9];
+ i2 = 4;
+ [o1, o2] = range(i1, i2);
+ disp(o1);
+ disp(o2);
+endfunction
diff --git a/demos/Brijesh_Demos/test_sind.sci b/demos/Brijesh_Demos/test_sind.sci
new file mode 100644
index 0000000..7f39166
--- /dev/null
+++ b/demos/Brijesh_Demos/test_sind.sci
@@ -0,0 +1,10 @@
+function test_sind
+ disp('Datatype: Double');
+ i1 = [0 30 45; 60 80 120] ;
+ o1 = sind(i1);
+ disp(o1);
+ disp('Datatype: float');
+ i2 = float([0 30 45; 60 80 120]);
+ o2 = sind(i2);
+ disp(o2);
+endfunction
diff --git a/demos/Brijesh_Demos/test_tand.sci b/demos/Brijesh_Demos/test_tand.sci
new file mode 100644
index 0000000..3143a88
--- /dev/null
+++ b/demos/Brijesh_Demos/test_tand.sci
@@ -0,0 +1,10 @@
+function test_tand
+ disp('Datatype: Double');
+ i1 = [0 30 45; 60 80 120] ;
+ o1 = tand(i1);
+ disp(o1);
+ disp('Datatype: float');
+ i2 = float([0 30 45; 60 80 120]);
+ o2 = tand(i2);
+ disp(o2);
+endfunction
diff --git a/demos/Brijesh_Demos/test_wcenter.sci b/demos/Brijesh_Demos/test_wcenter.sci
new file mode 100644
index 0000000..921e9ee
--- /dev/null
+++ b/demos/Brijesh_Demos/test_wcenter.sci
@@ -0,0 +1,14 @@
+function test_wcenter
+ disp('Datatype: Double');
+ i1 = [1 2 3; 4 5 6];
+ o1 = wcenter(i1,2);
+ disp(o1);
+ disp('Datatype: float');
+ i2 = float([1 2 3; 4 5 6]);
+ o2 = wcenter(i2,2);
+ disp(o2);
+ disp('Datatype: Double Complex');
+ i3 = [0 %i 3+%i; 4 5*%i 0];
+ o3 = wcenter(i3,2);
+ disp(o3);
+endfunction