summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorBrijeshcr2017-07-14 18:01:26 +0530
committerBrijeshcr2017-07-14 18:01:26 +0530
commitce5c0f9d407d533364e9e7adc81e4d338e031383 (patch)
tree26defae9d1a7b339ed5d5f979b63e815ac3beeba /demos
parent4f8c0f6aa5dddea07d84287ec2fb96276bd606d2 (diff)
downloadScilab2C_fossee_old-ce5c0f9d407d533364e9e7adc81e4d338e031383.tar.gz
Scilab2C_fossee_old-ce5c0f9d407d533364e9e7adc81e4d338e031383.tar.bz2
Scilab2C_fossee_old-ce5c0f9d407d533364e9e7adc81e4d338e031383.zip
ERF, ERFC and Demos added
Diffstat (limited to 'demos')
-rw-r--r--demos/Brijesh_Demos/Test_Add_SCE.sce4
-rw-r--r--demos/Brijesh_Demos/Test_Addition.sci8
-rw-r--r--demos/Brijesh_Demos/Test_Cross.sci44
-rw-r--r--demos/Brijesh_Demos/Test_Erf.sci10
-rw-r--r--demos/Brijesh_Demos/Test_Erfc.sci10
-rw-r--r--demos/Brijesh_Demos/Test_Isreal.sci25
-rw-r--r--demos/Brijesh_Demos/Test_Toeplitz.sci50
7 files changed, 151 insertions, 0 deletions
diff --git a/demos/Brijesh_Demos/Test_Add_SCE.sce b/demos/Brijesh_Demos/Test_Add_SCE.sce
new file mode 100644
index 0000000..e250078
--- /dev/null
+++ b/demos/Brijesh_Demos/Test_Add_SCE.sce
@@ -0,0 +1,4 @@
+a = 1;
+b = 5;
+c = a+b;
+disp(c);
diff --git a/demos/Brijesh_Demos/Test_Addition.sci b/demos/Brijesh_Demos/Test_Addition.sci
new file mode 100644
index 0000000..856ba63
--- /dev/null
+++ b/demos/Brijesh_Demos/Test_Addition.sci
@@ -0,0 +1,8 @@
+function Test_Addition()
+ a = 1;
+ b = 2;
+ d = float(b);
+ e = float(a)
+ c = e+d;
+ disp(c);
+endfunction
diff --git a/demos/Brijesh_Demos/Test_Cross.sci b/demos/Brijesh_Demos/Test_Cross.sci
new file mode 100644
index 0000000..01206b3
--- /dev/null
+++ b/demos/Brijesh_Demos/Test_Cross.sci
@@ -0,0 +1,44 @@
+function Test_Cross
+ disp('Datatype: Double');
+ i1 = [1 2;3 4;5 6];
+ i2 = [7 8;9 10;11 12];
+ o1 = cross(i1,i2);
+ disp(o1);
+
+ disp('Datatype: DoubleComplex');
+ i3 = [1+1*%i 2+2*%i;3+3*%i 4+4*%i;5+5*%i 6+6*%i];
+ i4 = [7+7*%i 8+8*%i;9+9*%i 10+10*%i;11+11*%i 12+12*%i];
+ o2 = cross(i3,i4);
+ disp(o2);
+
+ disp('Float');
+ i5 = float([1 2;3 4;5 6]);
+ i6 = float([7 8;9 10;11 12]);
+ o3 = cross(i5,i6);
+ disp(o3);
+
+ disp('Datatype: uint8');
+ i7 = uint8([1 2;3 4;5 6]);
+ i8 = uint8([7 8;9 10;11 12]);
+ o4 = cross(i7,i8);
+ disp(o4);
+
+ disp('Datatype: int8');
+ i9 = int8([1 2;3 4;5 6]);
+ i10 = int8([7 8;9 10;11 12]);
+ o5 = cross(i9,i10);
+ disp(o5);
+
+ disp('Datatype: uint16');
+ i11 = uint16([1 2;3 4;5 6]);
+ i12 = uint16([7 8;9 10;11 12]);
+ o6 = cross(i11,i12);
+ disp(o6);
+
+ disp('Datatype: int16');
+ i13 = int8([1 2;3 4;5 6]);
+ i14 = int8([7 8;9 10;11 12]);
+ o7 = cross(i13,i14);
+ disp(o7);
+
+endfunction
diff --git a/demos/Brijesh_Demos/Test_Erf.sci b/demos/Brijesh_Demos/Test_Erf.sci
new file mode 100644
index 0000000..42208f6
--- /dev/null
+++ b/demos/Brijesh_Demos/Test_Erf.sci
@@ -0,0 +1,10 @@
+function Test_Erf
+ disp('Datatype: Double');
+ i1 = [1 2 .5; 7 .8 .9];
+ o1 = erf(i1);
+ disp(o1);
+ disp('Datatype: float');
+ i2 = float([1 2 .5; 7 .8 .9]);
+ o2 = erf(i2);
+ disp(o2);
+endfunction
diff --git a/demos/Brijesh_Demos/Test_Erfc.sci b/demos/Brijesh_Demos/Test_Erfc.sci
new file mode 100644
index 0000000..2ad8cfe
--- /dev/null
+++ b/demos/Brijesh_Demos/Test_Erfc.sci
@@ -0,0 +1,10 @@
+function Test_Erfc
+ disp('Datatype: Double');
+ i1 = [1 2 .5; 7 .8 .9];
+ o1 = erfc(i1);
+ disp(o1);
+ disp('Datatype: float');
+ i2 = float([1 2 .5; 7 .8 .9]);
+ o2 = erfc(i2);
+ disp(o2);
+endfunction
diff --git a/demos/Brijesh_Demos/Test_Isreal.sci b/demos/Brijesh_Demos/Test_Isreal.sci
new file mode 100644
index 0000000..4846d31
--- /dev/null
+++ b/demos/Brijesh_Demos/Test_Isreal.sci
@@ -0,0 +1,25 @@
+function Test_Isreal
+ disp('Datatype: Double');
+ i1 = [1 2 3];
+ i2 = [1 2 3];
+ o1 = isequal(i1,i2);
+ disp(o1);
+
+ disp('Datatype: Float');
+ i3 = float([4 5 6]);
+ i4 = float([4 5 6]);
+ o2 = isequal(i3,i4);
+ disp(o2);
+
+ disp('Datatype: DoubleComplex');
+ i5 = [%i*3 %i*3 %i*3];
+ i6 = [%i*3 %i*3 %i*3];
+ o3 = isequal(i5,i6);
+ disp(o3);
+
+ disp('Datatype: uint16');
+ i7 = uint16([4 5 6]);
+ i8 = uint16([4 5 6]);
+ o4 = isequal(i7,i8);
+ disp(o4);
+endfunction
diff --git a/demos/Brijesh_Demos/Test_Toeplitz.sci b/demos/Brijesh_Demos/Test_Toeplitz.sci
new file mode 100644
index 0000000..6d1269e
--- /dev/null
+++ b/demos/Brijesh_Demos/Test_Toeplitz.sci
@@ -0,0 +1,50 @@
+function Test_Toeplitz()
+ disp('Datatype: Double');
+ ai = [1 2 3 4];
+ bi = [1 6 7 8];
+ as1 = toeplitz(ai,bi);
+ disp(as1);
+
+ disp('Datatype: Float');
+ aid = float(ai);
+ bid = float(bi);
+ as2 = toeplitz(aid,bid);
+ disp(as2);
+
+ disp('Datatype: uint8');
+ aiu8 = uint8(ai);
+ biu8 = uint8(bi);
+ as3 = toeplitz(aiu8,biu8);
+ disp(as3);
+
+ disp('Datatype: int8');
+ ai8 = int8(ai);
+ bi8 = int8(bi);
+ as4= toeplitz(ai8,bi8);
+ disp(as4);
+
+ disp('Datatype: uint16');
+ aiu16 = uint16(ai);
+ biu16 = uint16(bi);
+ as5 = toeplitz(aiu16,biu16);
+ disp(as5);
+
+ disp('Datatype: int16');
+ ai16 = int16(ai);
+ bi16 = int16(bi);
+ as6 = toeplitz(ai16,bi16);
+ disp(as6);
+
+ disp('Datatype: Double Complex');
+ adc = [1+%i*1 2+%i*2 3+%i*3 4+%i*4];
+ bdc = [1+%i*1 6+%i*6 7+%i*7 8+%i*8];
+ as7 = toeplitz(adc,bdc);
+ disp(as7);
+
+ disp('Datatype: Char');
+ aic = ['a' 'b' 'c' 'd'];
+ bic = ['a' 'x' 'y' 'z'];
+ as9 = toeplitz(aic,bic);
+ disp(as9);
+
+endfunction