diff options
author | Abhinav Dronamraju | 2017-09-29 22:00:40 +0530 |
---|---|---|
committer | Abhinav Dronamraju | 2017-09-29 22:00:40 +0530 |
commit | 9bc7ad78e8d7d7acc4b9387aa592542832e80b31 (patch) | |
tree | 7fce060665a91de5e5adb12d02003351c3d1fdfc /demos | |
parent | 33755eb085a3ca8154cf83773b23fbb8aac4ba3e (diff) | |
parent | ac0045f12ad3d0938758e9742f4107a334e1afaa (diff) | |
download | scilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.tar.gz scilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.tar.bz2 scilab2c-9bc7ad78e8d7d7acc4b9387aa592542832e80b31.zip |
NEW FEATURES AND NEW FUNCTIONS
Diffstat (limited to 'demos')
95 files changed, 1915 insertions, 4 deletions
diff --git a/demos/Abhinav_Demos/column.sci b/demos/Abhinav_Demos/column.sci new file mode 100644 index 00000000..82209876 --- /dev/null +++ b/demos/Abhinav_Demos/column.sci @@ -0,0 +1,26 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function column() + a=[1,2,3,4; 5,6,7,8; 98,162,6587,0] + disp( iscolumn(a)) + disp('') + b= float(a) + disp(iscolumn(b)) + c= [1,2,34,5] + d= uint16(c) + disp(iscolumn(d)) + disp('') + f= [1;2;3;4] + disp(iscolumn(f)) + disp('') + u= uint16(c) + disp(iscolumn(u)) + disp('') + g= [%i] + disp(iscolumn(g)) + disp('') + +endfunction diff --git a/demos/Abhinav_Demos/deviation.sci b/demos/Abhinav_Demos/deviation.sci new file mode 100644 index 00000000..99eb5b1c --- /dev/null +++ b/demos/Abhinav_Demos/deviation.sci @@ -0,0 +1,41 @@ +function deviation() + +a=[ 211.128 2912 4.12 123 ; 53211 12.312 21 0] +disp('Double') + +disp(mad(a, 'r')) +disp('') + +disp(mad(a, 'c')) +disp('') + +disp(mad(a)) +disp('') + +disp('Float') + +b= float(a) +disp(mad(b, 'r')) +disp('') + +disp(mad(b, 'c')) +disp('') + +disp(mad(b)) +disp('') + + +disp('DoubleComplex') + +c= [%i*971+ 231, 87+%i*16, 2400+%i*1721; 981,0, %i*1213] +disp(mad(c, 'r')) +disp('') + +disp(mad(c, 'c')) +disp('') + +disp(mad(c)) +disp('') + +endfunction + diff --git a/demos/Abhinav_Demos/is_matrix.sci b/demos/Abhinav_Demos/is_matrix.sci new file mode 100644 index 00000000..540189e0 --- /dev/null +++ b/demos/Abhinav_Demos/is_matrix.sci @@ -0,0 +1,41 @@ + +// Test file for "ismatrix" function for the data types double, float, double complex, uint16, string + +function is_matrix() + disp('Double') + a= [1 ,25, 52] + disp(ismatrix(a)) + disp('') + b=1.2131 + disp(ismatrix(b)) + disp('') + + disp('Float') + c=float(a) + disp(ismatrix(c)) + disp('') + d=float(b) + disp(ismatrix(d)) + disp('') + + disp('String') + e= ['af' 'as' '12'; '121' 'king' 'queen' ] + disp(ismatrix(e)) + disp('') + f='Light' + disp(ismatrix(f)) + disp('') + + disp('doubleComplex') + g=[%i*2; %i*91+100] + disp(ismatrix(g)) + disp('') + h= %i*98.12 + 121 + disp(ismatrix(h)) + disp('') + + disp('Uint16') + i= [12, 231 ,213, 123] + disp(ismatrix(i)) + disp('') +endfunction diff --git a/demos/Abhinav_Demos/matrix_reshape.sci b/demos/Abhinav_Demos/matrix_reshape.sci new file mode 100644 index 00000000..bf7fbbc8 --- /dev/null +++ b/demos/Abhinav_Demos/matrix_reshape.sci @@ -0,0 +1,18 @@ + +// Test file for "matrix" function for the data types double, float, double complex, uint16 + +function matrix_reshape() + a=[1,2,3,4;5,6,7,8;8,9,1,2] + b=float(a) + c= uint16(b) + d=[%i*2,3,4,5;%i+34,45,32,23; 1,%i*54,8690,1] + +double1= matrix(a,4,3) +float1= matrix (b,4,3) +uint161= matrix(c,4,3) +complex1= matrix(d,4,3) +disp( double1) +disp( float1) +disp( uint161) +disp( complex1) +endfunction diff --git a/demos/Abhinav_Demos/med.sci b/demos/Abhinav_Demos/med.sci new file mode 100644 index 00000000..821ca1f2 --- /dev/null +++ b/demos/Abhinav_Demos/med.sci @@ -0,0 +1,66 @@ +function med() + +a=float([12,287,312,52; 4,5,456,512; 12, 4, 6,213]) + + +disp('Float') + + +disp(median(a, 'r')) +disp('') + +disp(median(a, 'c')) +disp('') + +disp(median(a)) +disp('') + + +b=[12,287,312,52; 4,5,456,512; 12, 4, 6,213] + + +disp('Double') + + +disp(median(b, 'r')) +disp('') + +disp(median(b, 'c')) +disp('') + +disp(median(b)) +disp('') + + + +disp('uint16') + + +c=uint16([12,287,312,52; 4,5,456,512; 12, 4, 6,213]) +disp(median(c, 'r')) +disp('') + +disp(median(c, 'c')) +disp('') + +disp(median(c)) +disp('') + + +disp('doubleComplex') + + +d= [%i*21, 65+%i*7, %i*121, 56; %i*6112, 12 ,3, 0] +disp(median(d, 'r')) +disp('') + +disp(median(d, 'c')) +disp('') + +disp(median(d)) +disp('') + + + +endfunction + diff --git a/demos/Abhinav_Demos/modula.sci b/demos/Abhinav_Demos/modula.sci new file mode 100644 index 00000000..8f56e6c1 --- /dev/null +++ b/demos/Abhinav_Demos/modula.sci @@ -0,0 +1,57 @@ +function modula() + +a=312 +b=18.12 +disp('Double') + +disp(pmodulo(a,b)) + +disp(pmodulo(a,-b)) + +disp(pmodulo(-a,b)) + +disp(pmodulo(-a,-b)) + +k=[12 , -134 , 1213; -12.12, -0.12, 91281] +l=[12, ,1212 ,12; -91288.12, -0.912, -10000] + +disp(pmodulo(k,l)) + +disp('Float') +c= float(312) +d=float(121.212) + +disp(pmodulo(c,d)) + +disp(pmodulo(c,-d)) + +disp(pmodulo(-c,d)) + +disp(pmodulo(-c,-d)) + +e=float([12 , -134 , 1213; -12.12, -0.12, 91281]) +f=float([12, ,1212 ,12; -91288.12, -0.912, -10000]) + +disp( pmodulo(e,f)) + +disp('Uint16') + +g= int16(112) +h= int16(121) + +disp(pmodulo(g,h)) + +disp(pmodulo(g,-h)) + +disp(pmodulo(-g,h)) + +disp(pmodulo(-g,-h)) + +i= int16([12 , -134 , 1213; -12.12, -12.54, 91281]) + +j= int16([12, ,1212 ,12; 1121, -6000, -10000]) +disp( pmodulo(i,j)) + + +endfunction + diff --git a/demos/Abhinav_Demos/nan_cumsum.sci b/demos/Abhinav_Demos/nan_cumsum.sci new file mode 100644 index 00000000..c5943a0f --- /dev/null +++ b/demos/Abhinav_Demos/nan_cumsum.sci @@ -0,0 +1,35 @@ +function nan_cumsum () + x= [1 %nan 1 0.8; 21 1 13 %nan] + disp('Double') + a= nancumsum(x) + disp(a) + disp('') + b= nancumsum(x, 'r') + disp(b) + disp('') + c= nancumsum(x,'c') + disp(c) + disp('') + y= float(x) + disp('Float') + d= nancumsum(y) + disp(d) + disp('') + e= nancumsum(y, 'r') + disp(e) + disp('') + f= nancumsum(y,'c') + disp(f) + disp('') + z= [%nan , 12, 1219, %nan + %i*121; 121 %nan 90 12] + disp('DoubleComplex') + g= nancumsum(z) + disp(g) + disp('') + h= nancumsum(z, 'r') + disp(h) + disp('') + i= nancumsum(z,'c') + disp(i) + disp('') +endfunction diff --git a/demos/Abhinav_Demos/nan_max.sci b/demos/Abhinav_Demos/nan_max.sci new file mode 100644 index 00000000..c840e069 --- /dev/null +++ b/demos/Abhinav_Demos/nan_max.sci @@ -0,0 +1,43 @@ +function nan_max () + x= [1 %nan 1 0.8; 21 1 13 %nan] + disp('Double') + a= nanmax(x) + disp(a) + disp('') + [b,c]= nanmax(x) + disp(b) + disp('') + disp(c) + disp('') + d= nanmax(x) + disp(d) + disp('') + e=nanmax(x,'r') + f=nanmax(x,'c') + disp(e) + disp('') + disp(f) + disp('') + + y= float(x) + disp('Float') + g= nanmax(y) + disp(g) + disp('') + [h,i]= nanmax(y) + disp(h) + disp('') + disp(i) + disp('') + j= nanmax(y) + disp(j) + disp('') + k=nanmax(y,'r') + l=nanmax(y,'c') + disp(k) + disp('') + disp(l) + disp('') + + +endfunction diff --git a/demos/Abhinav_Demos/nan_median.sci b/demos/Abhinav_Demos/nan_median.sci new file mode 100644 index 00000000..f2b350c0 --- /dev/null +++ b/demos/Abhinav_Demos/nan_median.sci @@ -0,0 +1,31 @@ +function nan_median() + +x=[%nan 0.121 %nan 0.5 0.8; 0.12 %nan 1 0.9812 %nan; 0.4 0.65 1.08 12 0.1621; 12 12 24 1 12] + +disp('Double') + +disp(nanmedian(x)) +disp('') + +disp(nanmedian(x , 'r')) +disp('') + +disp(nanmedian(x, 'c')) +disp('') + +y= float(x) + +disp('Float') + +disp(nanmedian(y)) +disp('') + +disp(nanmedian(y , 'r')) +disp('') + +disp(nanmedian(y, 'c')) +disp('') + + +endfunction + diff --git a/demos/Abhinav_Demos/nan_stdev.sci b/demos/Abhinav_Demos/nan_stdev.sci new file mode 100644 index 00000000..0ff5b252 --- /dev/null +++ b/demos/Abhinav_Demos/nan_stdev.sci @@ -0,0 +1,31 @@ +function nan_stdev() + +x=[%nan 0.121 %nan 0.5 0.8; 21.9 %nan 1 0.9812 %nan; 0.12 0.65 1.08 12 0.1621; %nan 12 24 1 12] + +disp('Double') + +disp(nanstdev(x)) +disp('') + +disp(nanstdev(x , 'r')) +disp('') + +disp(nanstdev(x, 'c')) +disp('') + +y= float(x) + +disp('Float') + +disp(nanstdev(y)) +disp('') + +disp(nanstdev(y , 'r')) +disp('') + +disp(nanstdev(y, 'c')) +disp('') + + +endfunction + diff --git a/demos/Abhinav_Demos/nan_sum.sci b/demos/Abhinav_Demos/nan_sum.sci new file mode 100644 index 00000000..b6d10173 --- /dev/null +++ b/demos/Abhinav_Demos/nan_sum.sci @@ -0,0 +1,35 @@ +function nan_sum () + x= [1 %nan 1 0.8; 21 1 13 %nan] + disp('Double') + a= nansum(x) + disp(a) + disp('') + b= nansum(x, 'r') + disp(b) + disp('') + c= nansum(x,'c') + disp(c) + disp('') + y= float(x) + disp('Float') + d= nansum(y) + disp(d) + disp('') + e= nansum(y, 'r') + disp(e) + disp('') + f= nansum(y,'c') + disp(f) + disp('') + z= [%nan , 12, 1219, %nan + %i*121; 121 %nan 90 12] + disp('DoubleComplex') + g= nansum(z) + disp(g) + disp('') + h= nansum(z, 'r') + disp(h) + disp('') + i= nansum(z,'c') + disp(i) + disp('') +endfunction diff --git a/demos/Abhinav_Demos/non_zero.sci b/demos/Abhinav_Demos/non_zero.sci new file mode 100644 index 00000000..3e2b3ba9 --- /dev/null +++ b/demos/Abhinav_Demos/non_zero.sci @@ -0,0 +1,15 @@ + +// Test file for "nonzero" function for the data types double, float, double complex, uint16 + +function non_zero() + a=[12,4,4; 12,51,6] // double array + disp(nnz(a)) + b=0 //double scalar + disp(nnz(b)) + f= float(a) //float array + disp(nnz(f)) + z=%i*2+0 // doubleComplex scalar + disp(nnz(z)) + + +endfunction diff --git a/demos/Abhinav_Demos/nonzero.sci b/demos/Abhinav_Demos/nonzero.sci new file mode 100644 index 00000000..14a14162 --- /dev/null +++ b/demos/Abhinav_Demos/nonzero.sci @@ -0,0 +1,15 @@ + +// Test file for "nonzero" function for the data types double, float, double complex, uint16 + +function nonzero() + a=[12,4,4; 12,51,6] // double array + disp(nnz(a)) + b=0 //double scalar + disp(nnz(b)) + f= float(a) //float array + disp(nnz(f)) + z=%i*2+0 // doubleComplex scalar + disp(nnz(z)) + + +endfunction diff --git a/demos/Abhinav_Demos/nth_root.sci b/demos/Abhinav_Demos/nth_root.sci new file mode 100644 index 00000000..13e4223e --- /dev/null +++ b/demos/Abhinav_Demos/nth_root.sci @@ -0,0 +1,23 @@ +// Test file for "nthroot" function for the data types double, float, double complex. + + +function nth_root() + b= [1,2,3,4;5,6,7,8] + c=[45,12,4,12; 23,34,5,6] + d= nthroot(b,c) +disp(d) +disp('') +e=34 +f= nthroot(b,e) +disp(f) +disp('') +k=nthroot(3.2123,12) +disp(k) +disp('') + +m= float(b) +l= float(c) +disp(nthroot(m,l)) + + +endfunction diff --git a/demos/Abhinav_Demos/row.sci b/demos/Abhinav_Demos/row.sci new file mode 100644 index 00000000..264b174a --- /dev/null +++ b/demos/Abhinav_Demos/row.sci @@ -0,0 +1,25 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function Row() + a=[1,2,3,4; 5,6,7,8; 98,162,6587,0] + disp( isrow(a)) + disp('') + b= float(a) + disp(isrow(b)) + c= [1,2,34,5] + d= uint16(c) + disp(isrow(d)) + disp('') + f= [1;2;3;4] + disp(isrow(f)) + disp('') + u= uint16(c) + disp(isrow(u)) + disp('') + g= [%i*1; 7] + disp(isrow(g)) + disp('') +endfunction diff --git a/demos/Abhinav_Demos/scalar.sci b/demos/Abhinav_Demos/scalar.sci new file mode 100644 index 00000000..6b280eaa --- /dev/null +++ b/demos/Abhinav_Demos/scalar.sci @@ -0,0 +1,12 @@ +// Test file for "isscalar" function for the data types double, float, double complex. +function scalar() + a=[1,2,3,4] + disp(isscalar(a)) + b= float(a) + disp(isscalar(b)) + c= %i*2+34 + disp(isscalar(c)) + + + +endfunction diff --git a/demos/Abhinav_Demos/square.sci b/demos/Abhinav_Demos/square.sci new file mode 100644 index 00000000..172f73c4 --- /dev/null +++ b/demos/Abhinav_Demos/square.sci @@ -0,0 +1,13 @@ +// Test file for "Column" function for the data types double, float, double complex, string. +// All the below statements are added to initialize variables in different data types + + +function square() + a=[1,2,3,4; 5,6,7,8; 98,162,6587,0] + disp(issquare(a)) + disp('') + b= [%i+25, 1, %i*5+12] + disp(issquare(b)) + disp('') + +endfunction diff --git a/demos/Abhinav_Demos/std_dev.sci b/demos/Abhinav_Demos/std_dev.sci new file mode 100644 index 00000000..f7dbe41d --- /dev/null +++ b/demos/Abhinav_Demos/std_dev.sci @@ -0,0 +1,20 @@ +// Test file for "Column" function for the data types double, float, double complex, string. +// All the below statements are added to initialize variables in different data types + + +function std_dev() + a=[1,2,3,4; 5,6,7,8; 98,162,6587,0] + disp('Double') + disp(stdev(a)) + disp('') + disp(stdev(a,'r')) + disp('') + disp(stdev(a,'c')) + b=float(a) + disp('Float') + disp(stdev(b)) + disp('') + disp(stdev(b,'r')) + disp('') + disp(stdev(b,'c')) +endfunction diff --git a/demos/Abhinav_Demos/test_faurre.sci b/demos/Abhinav_Demos/test_faurre.sci new file mode 100644 index 00000000..4c32354b --- /dev/null +++ b/demos/Abhinav_Demos/test_faurre.sci @@ -0,0 +1,22 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_faurre() + disp(" ** faurre ** ") + disp('Double') + n=3 + H= [ 2 1 1 ; 12 3 7; 5 1 2 ] + F=[ 0 2 21 ; 2 5.1 1; 5 6 1] + G=[ 1 2 21 ; 3 20 6; 5 6 7 ] + R0=[6 7 2; 51 1 2; 1 2 3] + [P R T]= faurre(n,H,F,G,R0) + disp(P) + disp('') + disp(R) + disp('') + disp(T) + disp('') + +endfunction diff --git a/demos/Abhinav_Demos/test_gsort.sci b/demos/Abhinav_Demos/test_gsort.sci new file mode 100644 index 00000000..bd51c697 --- /dev/null +++ b/demos/Abhinav_Demos/test_gsort.sci @@ -0,0 +1,81 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_gsort() + seq= [1 21 4; 10 5 98; 3.21 8.921 1000] + disp(seq) + disp('') + a= gsort(seq); + b= gsort(seq, 'r'); + c= gsort(seq, 'c'); + d= gsort(seq, 'r', 'i'); + e= gsort(seq, 'c', 'd'); + disp('Double') + disp(a) + disp('') + disp(b) + disp('') + disp(c) + disp('') + disp(d) + disp('') + disp(e) + disp('') + seq1= float(seq); + disp('') + f= gsort(seq1); + g= gsort(seq1, 'r'); + h= gsort(seq1, 'c'); + i= gsort(seq1, 'r', 'i'); + j= gsort(seq1, 'c', 'd'); + disp('Float') + disp(f) + disp('') + disp(g) + disp('') + disp(h) + disp('') + disp(i) + disp('') + disp(j) + disp('') + seq2= uint16(seq); + disp('') + k= gsort(seq2); + l= gsort(seq2, 'r'); + m= gsort(seq2, 'c'); + n= gsort(seq2, 'r', 'i'); + o= gsort(seq2, 'c', 'd'); + disp('Uint16') + disp(k) + disp('') + disp(l) + disp('') + disp(m) + disp('') + disp(n) + disp('') + disp(o) + disp('') + seq3= [%i*21, 65+%i*7, %i*121, 56; %i*6112, 12 ,3, 0] + disp('') + p= gsort(seq3); + q= gsort(seq3, 'r'); + r1= gsort(seq3, 'c'); + s= gsort(seq3, 'r', 'i'); + t= gsort(seq3, 'c', 'd'); + disp('Double Complex') + disp(p) + disp('') + disp(q) + disp('') + disp(r1) + disp('') + disp(s) + disp('') + disp(t) + disp('') + +endfunction diff --git a/demos/Abhinav_Demos/test_hank.sci b/demos/Abhinav_Demos/test_hank.sci new file mode 100644 index 00000000..b55cbc81 --- /dev/null +++ b/demos/Abhinav_Demos/test_hank.sci @@ -0,0 +1,21 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_hank() + seq= [1 21 123 12;11 4 5 6] + final= hank(2,1,seq); + //disp(seq) + disp('') + disp(final) + disp('') + seq1= float([21 1231 1 12; 1231 12 21 2]) + a=float(2) + b=float(1) + final1 = hank(a,b, seq1) + disp('') + disp(final1) + disp('') + +endfunction diff --git a/demos/Abhinav_Demos/test_kalm.sci b/demos/Abhinav_Demos/test_kalm.sci new file mode 100644 index 00000000..006f3c99 --- /dev/null +++ b/demos/Abhinav_Demos/test_kalm.sci @@ -0,0 +1,25 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_kalm() + disp(" ** KALM ** ") + disp('Double') + y=[1 2 ; 3 4] + x0=[4 50; 5 6] + p0=[4 1 ; 27 8] + f=[22 0;1 3] + g= [10.1 2 ; 3 42] + h=[ 5 23 ;2 1] + q= [2 3 ; 12 3] + rr= [ 21 2 ; 100 91] + [x1,p1,x,p]= kalm(y,x0,p0,f,g,h,q,rr) + disp(x1) + disp(p1) + disp(x) + disp(p) + + + +endfunction diff --git a/demos/Abhinav_Demos/test_mvcorrel.sci b/demos/Abhinav_Demos/test_mvcorrel.sci new file mode 100644 index 00000000..bcc110c4 --- /dev/null +++ b/demos/Abhinav_Demos/test_mvcorrel.sci @@ -0,0 +1,31 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_mvcorrel() + disp(" ** mvcorrel ** "); + disp('Double'); + a=[1;0;3;4;5;4;0]; + b= mvcorrel(a); + disp(b); + disp('') + c=[1 0 3; 4 5 8; 1 10 25]; + d=mvcorrel(c) + disp(d) + disp('') + e=mvcorrel(1) + disp(e) + disp('Float'); + f=float([1;0;3;4;5;4;0]); + g= mvcorrel(f); + disp(g); + disp('') + h=float([1 0 3; 4 5 8; 1 10 25]); + i=mvcorrel(h) + disp(i) + disp('') + j= float(4) + k=mvcorrel(j) + disp(k) +endfunction diff --git a/demos/Abhinav_Demos/test_pertrans.sci b/demos/Abhinav_Demos/test_pertrans.sci new file mode 100644 index 00000000..a84f7257 --- /dev/null +++ b/demos/Abhinav_Demos/test_pertrans.sci @@ -0,0 +1,31 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_pertrans() + a= [1 2 3; 4 5 6; 7 8 9] + b= pertrans(a) + disp('Double') + disp(b) + disp('') + disp(pertrans(6)) + disp('') + c= float(a) + d=pertrans(c) + e= float(2) + disp('Float') + disp(d) + disp('') + disp(pertrans(e)) + disp('') + f=[%i*121+12; 4+%i*7;1] + g= pertrans(f) + disp('Double Complex') + disp(g) + disp('') + disp(pertrans(%i*8712+12)) + disp('') + + +endfunction diff --git a/demos/Abhinav_Demos/test_rank.sci b/demos/Abhinav_Demos/test_rank.sci new file mode 100644 index 00000000..95f4a7dc --- /dev/null +++ b/demos/Abhinav_Demos/test_rank.sci @@ -0,0 +1,20 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_rank() + disp(" ** RANK ** ") + disp('Double') + A = [1,2,3,11;4,5,0.1,2.12;7,0,0,16.11] // Matrix - A + s = rank(A) // Calling Function Sequence + disp(s) + disp('') + + disp('Double Complex') + B= [%i*12, 12 , 12; 98*%i , 24*%i, 0; 12, %i*12, 0]; + t= rank(B) + disp(t) + disp('') + +endfunction diff --git a/demos/Abhinav_Demos/test_strange.sci b/demos/Abhinav_Demos/test_strange.sci new file mode 100644 index 00000000..35deb2ce --- /dev/null +++ b/demos/Abhinav_Demos/test_strange.sci @@ -0,0 +1,43 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_strange() + seq= [1 2.01 400.0; 10.912 5 9.81; 3.21 8.921 100.0] + a= strange(seq); + b= strange(seq, 'r'); + c= strange(seq, 'c'); + disp('Double') + disp(a) + disp('') + disp(b) + disp('') + disp(c) + disp('') + seq1= float(seq); + disp('') + f= strange(seq1); + g= strange(seq1, 'r'); + h= strange(seq1, 'c'); + disp('Float') + disp(f) + disp('') + disp(g) + disp('') + disp(h) + disp('') + seq2= uint16(seq); + k= strange(seq2); + l= strange(seq2, 'r'); + m= strange(seq2, 'c'); + disp('Uint16') + disp(k) + disp('') + disp(l) + disp('') + disp(m) + disp('') + + +endfunction diff --git a/demos/Abhinav_Demos/test_wiener.sci b/demos/Abhinav_Demos/test_wiener.sci new file mode 100644 index 00000000..780e9571 --- /dev/null +++ b/demos/Abhinav_Demos/test_wiener.sci @@ -0,0 +1,25 @@ +// Test file for "Column" function for the data types double, float, double complex, string , uint16. +// All the below statements are added to initialize variables in different data types +//The function written doesn't work for string or character scalar as of now. + + +function test_wiener() + disp(" ** WIENER ** ") + disp('Double') + y=[1 2 ; 3 4] + x0=[1 4; 3 6 ] + p0=[4 1 ; 27 8] + f=[22 0;1 3] + g= [10.1 2 ; 3 42] + h=[ 5 23 ;2 1] + q= [2 3 ; 12 3] + rr= [ 21 2 ; 100 91] + [xs,ps,xf,pf]= wiener(y,x0,p0,f,g,h,q,rr) + //disp(x1) + //disp(p1) + //disp(x) + //disp(p) + + + +endfunction diff --git a/demos/Abhinav_Demos/vector.sci b/demos/Abhinav_Demos/vector.sci new file mode 100644 index 00000000..dedd8f1a --- /dev/null +++ b/demos/Abhinav_Demos/vector.sci @@ -0,0 +1,16 @@ +// Test file for "vector" function for the data types double, float, double complex. +function vector() + a=[1,2,3,4] + disp(isvector(a)) + disp('') + b= %i+2 + disp(isvector(b)) + disp('') + c= float([1,3,4;1,2,3]) + disp(isvector(c)) + disp('') + d= [%i*812; %i*12] + disp(isvector(d)) + disp('') + +endfunction diff --git a/demos/Arduino/Arduino.dem.gateway.sce b/demos/Arduino/Arduino.dem.gateway.sce new file mode 100644 index 00000000..417291ac --- /dev/null +++ b/demos/Arduino/Arduino.dem.gateway.sce @@ -0,0 +1,22 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Jorawar Singh, Yash Pratap Singh Tomar +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +subdemolist = ["Arduino blink", "blink.dem.sce"; + "Arduino digital input", "digital_in.dem.sce"; + "Arduino analog voltage i/o", "analog_in_out_volt.dem.sce"; + "Arduino analog output", "analog_out.dem.sce"; + "Arduino DC motor", "dc_motor.dem.sce"; + "Arduino Master write", "master_write.dem.sce"; + ]; + +global SCI2CHOME; +subdemolist(:,2) = SCI2CHOME + "/demos/Arduino/"+ subdemolist(:,2); diff --git a/demos/Arduino/analog_in_out_volt.dem.sce b/demos/Arduino/analog_in_out_volt.dem.sce new file mode 100644 index 00000000..ca6da611 --- /dev/null +++ b/demos/Arduino/analog_in_out_volt.dem.sce @@ -0,0 +1,7 @@ +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testArduino/analog_in_check_volt.sci", TMPDIR, SCI2CHOME+"/tests/unit_tests/testArduino", "All", "make" ,"Arduino", "uno"); + +editor([TMPDIR+"/setup_arduino.cpp";TMPDIR+"/loop_arduino.cpp"]); diff --git a/demos/Arduino/analog_out.dem.sce b/demos/Arduino/analog_out.dem.sce new file mode 100644 index 00000000..65a1e279 --- /dev/null +++ b/demos/Arduino/analog_out.dem.sce @@ -0,0 +1,7 @@ +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testArduino/analog_check.sci", TMPDIR, SCI2CHOME+"/tests/unit_tests/testArduino", "All", "make" ,"Arduino", "uno"); + +editor([TMPDIR+"/setup_arduino.cpp";TMPDIR+"/loop_arduino.cpp"]); diff --git a/demos/Arduino/blink.dem.sce b/demos/Arduino/blink.dem.sce new file mode 100644 index 00000000..b01d3dae --- /dev/null +++ b/demos/Arduino/blink.dem.sce @@ -0,0 +1,7 @@ +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testArduino/blink_13.sci", TMPDIR, SCI2CHOME+"/tests/unit_tests/testArduino", "All", "make" ,"Arduino", "uno"); + +editor([TMPDIR+"/setup_arduino.cpp";TMPDIR+"/loop_arduino.cpp"]); diff --git a/demos/Arduino/dc_motor.dem.sce b/demos/Arduino/dc_motor.dem.sce new file mode 100644 index 00000000..36c0badd --- /dev/null +++ b/demos/Arduino/dc_motor.dem.sce @@ -0,0 +1,7 @@ +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testArduino/board_test_release2.sci", TMPDIR, SCI2CHOME+"/tests/unit_tests/testArduino", "All", "make" ,"Arduino", "uno"); + +editor([TMPDIR+"/setup_arduino.cpp";TMPDIR+"/loop_arduino.cpp"]); diff --git a/demos/Arduino/digital_in.dem.sce b/demos/Arduino/digital_in.dem.sce new file mode 100644 index 00000000..2eb4c3a0 --- /dev/null +++ b/demos/Arduino/digital_in.dem.sce @@ -0,0 +1,7 @@ +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testArduino/digital_in_check.sci", TMPDIR, SCI2CHOME+"/tests/unit_tests/testArduino", "All", "make" ,"Arduino", "uno"); + +editor([TMPDIR+"/setup_arduino.cpp";TMPDIR+"/loop_arduino.cpp"]); diff --git a/demos/Arduino/master_write.dem.sce b/demos/Arduino/master_write.dem.sce new file mode 100644 index 00000000..cdf522db --- /dev/null +++ b/demos/Arduino/master_write.dem.sce @@ -0,0 +1,7 @@ +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testArduino/i2c_master.sci", TMPDIR, SCI2CHOME+"/tests/unit_tests/testArduino", "All", "make" ,"Arduino", "uno"); + +editor([TMPDIR+"/setup_arduino.cpp";TMPDIR+"/loop_arduino.cpp"]); diff --git a/demos/Brijesh_Demos/test_addition.sci b/demos/Brijesh_Demos/test_addition.sci new file mode 100644 index 00000000..f70f0aff --- /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_besseli.sci b/demos/Brijesh_Demos/test_besseli.sci new file mode 100644 index 00000000..c08142fd --- /dev/null +++ b/demos/Brijesh_Demos/test_besseli.sci @@ -0,0 +1,12 @@ +function test_besseli + disp('Datatype: Double'); + i1 = [1 2 3 4 5]; + i2 = [6 7 8 9 10]; + o1 = besseli(i1,i2); + disp(o1); + disp('Datatype: float'); + i3 = float([1 2 3 4 5]); + i4 = float([6 7 8 9 10]); + o2 = besseli(i3,i4); + disp(o2); +endfunction diff --git a/demos/Brijesh_Demos/test_besselj.sci b/demos/Brijesh_Demos/test_besselj.sci new file mode 100644 index 00000000..a9b92ed1 --- /dev/null +++ b/demos/Brijesh_Demos/test_besselj.sci @@ -0,0 +1,12 @@ +function test_besselj + disp('Datatype: Double'); + i1 = [1 2 3 4 5]; + i2 = [6 7 8 9 10]; + o1 = besselj(i1,i2); + disp(o1); + disp('Datatype: float'); + i3 = float([1 2 3 4 5]); + i4 = float([6 7 8 9 10]); + o2 = besselj(i3,i4); + disp(o2); +endfunction diff --git a/demos/Brijesh_Demos/test_besselk.sci b/demos/Brijesh_Demos/test_besselk.sci new file mode 100644 index 00000000..7beface2 --- /dev/null +++ b/demos/Brijesh_Demos/test_besselk.sci @@ -0,0 +1,12 @@ +function test_besselk + disp('Datatype: Double'); + i1 = [1 2 3 4 5]; + i2 = [6 7 8 9 10]; + o1 = besselk(i1,i2); + disp(o1); + disp('Datatype: float'); + i3 = float([1 2 3 4 5]); + i4 = float([6 7 8 9 10]); + o2 = besselk(i3,i4); + disp(o2); +endfunction diff --git a/demos/Brijesh_Demos/test_bessely.sci b/demos/Brijesh_Demos/test_bessely.sci new file mode 100644 index 00000000..e4801690 --- /dev/null +++ b/demos/Brijesh_Demos/test_bessely.sci @@ -0,0 +1,12 @@ +function test_bessely + disp('Datatype: Double'); + i1 = [1 2 3 4 5]; + i2 = [6 7 8 9 10]; + o1 = bessely(i1,i2); + disp(o1); + disp('Datatype: float'); + i3 = float([1 2 3 4 5]); + i4 = float([6 7 8 9 10]); + o2 = bessely(i3,i4); + disp(o2); +endfunction diff --git a/demos/Brijesh_Demos/test_beta.sci b/demos/Brijesh_Demos/test_beta.sci new file mode 100644 index 00000000..a5465a77 --- /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_calerf.sci b/demos/Brijesh_Demos/test_calerf.sci new file mode 100644 index 00000000..b700c5dc --- /dev/null +++ b/demos/Brijesh_Demos/test_calerf.sci @@ -0,0 +1,18 @@ +function test_calerf + disp('Datatype: Double'); + i1 = [0.9 .754; .32 -.84]; + o1 = calerf(i1,0); + disp(o1); + disp(" "); + o2 = calerf(i1,1); + disp(o2); + disp(" "); + o3 = calerf(i1,2); + disp(o3); + disp(" "); + disp('Datatype: float'); + i2 = float([0.9 .754; .32 -.84]); + o4 = calerf(i2,2); + disp(o4); + disp(" "); +endfunction diff --git a/demos/Brijesh_Demos/test_center.sci b/demos/Brijesh_Demos/test_center.sci new file mode 100644 index 00000000..92815800 --- /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 00000000..80a09a0e --- /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 00000000..b1825328 --- /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_cross.sci b/demos/Brijesh_Demos/test_cross.sci new file mode 100644 index 00000000..6c2224d6 --- /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 00000000..5cebb253 --- /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 00000000..ac50e150 --- /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_erfcx.sci b/demos/Brijesh_Demos/test_erfcx.sci new file mode 100644 index 00000000..a2a553c6 --- /dev/null +++ b/demos/Brijesh_Demos/test_erfcx.sci @@ -0,0 +1,10 @@ +function test_erfcx + disp('Datatype: Double'); + i1 = [.75 .8 -.32]; + o1 = erfcx(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_erfinv.sci b/demos/Brijesh_Demos/test_erfinv.sci new file mode 100644 index 00000000..483d2903 --- /dev/null +++ b/demos/Brijesh_Demos/test_erfinv.sci @@ -0,0 +1,10 @@ +function test_erfinv + disp('Datatype: Double'); + i1 = [12 0.6 -2 -0.75]; + o1 = erfinv(i1); + disp(o1); + disp('Datatype: float'); + i2 = float([5 0.35 -1 -.97 -6]); + o2 = erf(i2); + disp(o2); +endfunction diff --git a/demos/Brijesh_Demos/test_gamma.sci b/demos/Brijesh_Demos/test_gamma.sci new file mode 100644 index 00000000..4ca5f021 --- /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 00000000..a12a57bb --- /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_isequal.sci b/demos/Brijesh_Demos/test_isequal.sci new file mode 100644 index 00000000..1531275d --- /dev/null +++ b/demos/Brijesh_Demos/test_isequal.sci @@ -0,0 +1,25 @@ +function test_isequal + 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_isinf.sci b/demos/Brijesh_Demos/test_isinf.sci new file mode 100644 index 00000000..59be9759 --- /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_log2.sci b/demos/Brijesh_Demos/test_log2.sci new file mode 100644 index 00000000..bd1288b2 --- /dev/null +++ b/demos/Brijesh_Demos/test_log2.sci @@ -0,0 +1,14 @@ +function test_log2 + disp('Datatype: Double'); + i1 = [1 2 3; 4 5 6]; + o1 = log2(i1); + disp(o1); + disp('Datatype: float'); + i2 = float([1 2 3; 4 5 6]); + o2 = log2(i2); + disp(o2); + disp('Datatype: Double Complex'); + i3 = [5*%i+6, 3; 1 %i]; + o3 = log2(i3); + disp(o3); +endfunction diff --git a/demos/Brijesh_Demos/test_lu.sci b/demos/Brijesh_Demos/test_lu.sci new file mode 100644 index 00000000..aa7c2013 --- /dev/null +++ b/demos/Brijesh_Demos/test_lu.sci @@ -0,0 +1,11 @@ +function test_lu + disp('Datatype: Double'); + i1 = [1 2 ;3 4 ;5 6;3 4 ;5 6; 7 8]; + [o1, o2] = lu(i1); + disp(o1); + disp(o2); + //disp('Datatype: float'); + //i2 = float([1 2 3; 4 5 6]); + //o2 = gamma(i2); + //disp(o2); +endfunction diff --git a/demos/Brijesh_Demos/test_moment.sci b/demos/Brijesh_Demos/test_moment.sci new file mode 100644 index 00000000..35e0d7aa --- /dev/null +++ b/demos/Brijesh_Demos/test_moment.sci @@ -0,0 +1,14 @@ +function test_moment + disp('Datatype: Double'); + i1 = [1 2 3; 4 5 6]; + o1 = moment(i1,1,'r'); + disp(o1); + disp('Datatype: float'); + i2 = float([1 2 3; 4 5 6]); + o2 = moment(i2,1,'r'); + disp(o2); + disp('Datatype: Double Complex'); + i3 = [0 %i 3+4*%i;%i 5+%i 6+%i]; + o3 = moment(i3,1,'r'); + disp(o3); +endfunction diff --git a/demos/Brijesh_Demos/test_nanmean.sci b/demos/Brijesh_Demos/test_nanmean.sci new file mode 100644 index 00000000..6009ad8a --- /dev/null +++ b/demos/Brijesh_Demos/test_nanmean.sci @@ -0,0 +1,14 @@ +function test_nanmean + disp('Datatype: Double'); + i1 = [1 %nan;3 4;5 %nan]; + o1 = nanmean(i1,'r'); + disp(o1); + disp('Datatype: Float'); + i2 = float([1 %nan;3 4;5 %nan]); + o2 = nanmean(i2,'r'); + disp(o2); + disp('Datatype: Double complex'); + i3 = [1 %nan %i;3 4+1*%i %nan;5 %nan %i]; + o3 = nanmean(i3,'c'); + disp(o3); +endfunction diff --git a/demos/Brijesh_Demos/test_nanmin.sci b/demos/Brijesh_Demos/test_nanmin.sci new file mode 100644 index 00000000..1665df3a --- /dev/null +++ b/demos/Brijesh_Demos/test_nanmin.sci @@ -0,0 +1,11 @@ +function test_nanmin + disp('Datatype: Double'); + i1 = [ 1 2 %nan; 3 %nan -4; %nan 5 6]; + [o1, p1] = nanmin(i1); + disp(o1); + disp(p1); + //disp('Datatype: Float'); + //i2 = float([1 %nan;3 4;5 %nan]); + //o2 = nanmean(i2,'r'); + //disp(o2); +endfunction diff --git a/demos/Brijesh_Demos/test_ndgrid.sci b/demos/Brijesh_Demos/test_ndgrid.sci new file mode 100644 index 00000000..79f9a5d3 --- /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 00000000..beca7a1a --- /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_scaling.sci b/demos/Brijesh_Demos/test_scaling.sci new file mode 100644 index 00000000..19aa7f4c --- /dev/null +++ b/demos/Brijesh_Demos/test_scaling.sci @@ -0,0 +1,15 @@ +function test_scaling + disp("Data Type: Double"); + i1 = [1 2 3; 4 5 6]; + i2 = [5 5]; + o1 = scaling(i1, 10, i2); + disp(o1); + disp("Data Type: Float"); + o2 = scaling(float(i1), 10, float(i2)); + disp(o2); + disp("Data Type: Double Complex"); + i3 = [1 2+%i %i*3; 4 0 6]; + i4 = [5*%i 0]; + o3 = scaling(i3, %i, i4); + disp(o3); +endfunction diff --git a/demos/Brijesh_Demos/test_sind.sci b/demos/Brijesh_Demos/test_sind.sci new file mode 100644 index 00000000..7f391663 --- /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 00000000..3143a88a --- /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_toeplitz.sci b/demos/Brijesh_Demos/test_toeplitz.sci new file mode 100644 index 00000000..4a52e7ba --- /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 diff --git a/demos/Brijesh_Demos/test_wcenter.sci b/demos/Brijesh_Demos/test_wcenter.sci new file mode 100644 index 00000000..921e9ee5 --- /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 diff --git a/demos/Brijesh_Demos/test_window.sci b/demos/Brijesh_Demos/test_window.sci new file mode 100644 index 00000000..740d56b6 --- /dev/null +++ b/demos/Brijesh_Demos/test_window.sci @@ -0,0 +1,5 @@ +function test_window + disp('Datatype: Double'); + o1 = window('hn', 10); + disp(o1); +endfunction diff --git a/demos/CT/CT.dem.gateway.sce b/demos/CT/CT.dem.gateway.sce new file mode 100644 index 00000000..1aba91e4 --- /dev/null +++ b/demos/CT/CT.dem.gateway.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Jorawar Singh, Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +subdemolist = ["Discrete Cosine Transform" , "test_dct.dem.sce"; + "Inverse Cosine Transform" , "test_idct.dem.sce"; + ]; + +global SCI2CHOME; +subdemolist(:,2) = SCI2CHOME + "/demos/CT/"+ subdemolist(:,2); diff --git a/demos/CT/test_dct.dem.sce b/demos/CT/test_dct.dem.sce new file mode 100644 index 00000000..b1b62475 --- /dev/null +++ b/demos/CT/test_dct.dem.sce @@ -0,0 +1,18 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author : Ukasha Noor +// + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME + "/tests/unit_tests/test01_DCT/scilabcode/main.sci", TMPDIR,SCI2CHOME + "/tests/unit_tests/test01_DCT/scilabcode"); + diff --git a/demos/CT/test_idct.dem.sce b/demos/CT/test_idct.dem.sce new file mode 100644 index 00000000..b1d33392 --- /dev/null +++ b/demos/CT/test_idct.dem.sce @@ -0,0 +1,18 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author : Ukasha Noor +// + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME + "/tests/unit_tests/test02_IDCT/scilabcode/testidct.sci", TMPDIR,SCI2CHOME + "/tests/unit_tests/test02_IDCT/scilabcode"); + diff --git a/demos/Filters/Filter.dem.sce b/demos/Filters/Filter.dem.sce new file mode 100644 index 00000000..100b37b3 --- /dev/null +++ b/demos/Filters/Filter.dem.sce @@ -0,0 +1,21 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// +// +lines(0); + +global SCI2CHOME +editor([SCI2CHOME+"/tests/unit_tests/test004_Filter/scilabcode/main.sci"; + SCI2CHOME+"/tests/unit_tests/test004_Filter/scilabcode/high_pass.sci"]); + +scilab2c(SCI2CHOME+"/tests/unit_tests/test004_Filter/scilabcode/main.sci", TMPDIR, SCI2CHOME+"/tests/unit_tests/test004_Filter/scilabcode"); + +editor([TMPDIR+"/main.c"; + TMPDIR+"/d2d0d0d0high_passd2.c"]); diff --git a/demos/Filters/FilterResponse.dem.sce b/demos/Filters/FilterResponse.dem.sce new file mode 100644 index 00000000..7104836d --- /dev/null +++ b/demos/Filters/FilterResponse.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +//This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ankit Raj +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/test_filterResponse/scilabcode/main.sci",TMPDIR,SCI2CHOME+"/tests/unit_tests/test_filterResponse/scilabcode"); diff --git a/demos/Filters/Filters.dem.gateway.sce b/demos/Filters/Filters.dem.gateway.sce new file mode 100644 index 00000000..274d0e4f --- /dev/null +++ b/demos/Filters/Filters.dem.gateway.sce @@ -0,0 +1,19 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Jorawar Singh, Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +subdemolist = ["High Pass Filter", "Filter.dem.sce"; + "Analog Filters","analogFilter.dem.sce"; + "Filter Responses","FilterResponse.dem.sce"; + ]; + +global SCI2CHOME; +subdemolist(:,2) = SCI2CHOME + "/demos/Filters/"+ subdemolist(:,2); diff --git a/demos/Filters/analogFilter.dem.sce b/demos/Filters/analogFilter.dem.sce new file mode 100644 index 00000000..674c9543 --- /dev/null +++ b/demos/Filters/analogFilter.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +//This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ankit Raj +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/test_analogFilters/scilabcode/main.sci",TMPDIR,SCI2CHOME+"/tests/unit_tests/test_analogFilters/scilabcode"); diff --git a/demos/Jacobi.dem.sce b/demos/Jacobi.dem.sce new file mode 100644 index 00000000..0b1618c4 --- /dev/null +++ b/demos/Jacobi.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ankit Raj +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/test_jacobi/scilabcode/main.sci",TMPDIR,SCI2CHOME+"/tests/unit_tests/test_jacobi/scilabcode"); + diff --git a/demos/LinearAlgebra/FULLRF.dem.sce b/demos/LinearAlgebra/FULLRF.dem.sce new file mode 100644 index 00000000..3aeeba20 --- /dev/null +++ b/demos/LinearAlgebra/FULLRF.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testfullrf/testfullrf.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testfullrf"); + +editor(TMPDIR+"/main.c"); diff --git a/demos/LinearAlgebra/GIVENS.dem.sce b/demos/LinearAlgebra/GIVENS.dem.sce new file mode 100644 index 00000000..0ab2d2a7 --- /dev/null +++ b/demos/LinearAlgebra/GIVENS.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testgivens/testgivens.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testgivens"); + +editor(TMPDIR+"/main.c"); diff --git a/demos/LinearAlgebra/HESS.dem.sce b/demos/LinearAlgebra/HESS.dem.sce new file mode 100644 index 00000000..4c70d67b --- /dev/null +++ b/demos/LinearAlgebra/HESS.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testhess/testhess.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testhess"); + +editor(TMPDIR+"/main.c"); diff --git a/demos/LinearAlgebra/HOUSEHOLDER.dem.sce b/demos/LinearAlgebra/HOUSEHOLDER.dem.sce new file mode 100644 index 00000000..74474071 --- /dev/null +++ b/demos/LinearAlgebra/HOUSEHOLDER.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testhouseholder/testhouseholder.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testhouseholder"); + +editor(TMPDIR+"/main.c"); diff --git a/demos/LinearAlgebra/LinearAlgebra.dem.gateway.sce b/demos/LinearAlgebra/LinearAlgebra.dem.gateway.sce new file mode 100644 index 00000000..ef99e531 --- /dev/null +++ b/demos/LinearAlgebra/LinearAlgebra.dem.gateway.sce @@ -0,0 +1,27 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Jorawar Singh, Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +subdemolist = ["Singular Value Decomposition", "SVD.dem.sce"; + "Singular Value Approximation", "SVA.dem.sce"; + "SQROOT", "SQROOT.dem.sce"; + "SPEC", "SPEC.dem.sce"; + "ROWCOMP","ROWCOMP.dem.sce"; + "QR Decomposition", "QR.dem.sce"; + "NORM type 2", "NORM.dem.sce"; + "HOUSEHOLDER","HOUSEHOLDER.dem.sce"; + "HESS", "HESS.dem.sce"; + "GIVENS Transformation", "GIVENS.dem.sce"; + "Full rank factorization","FULLRF.dem.sce"; + ]; + +global SCI2CHOME; +subdemolist(:,2) = SCI2CHOME + "/demos/LinearAlgebra/"+ subdemolist(:,2); diff --git a/demos/LinearAlgebra/NORM.dem.sce b/demos/LinearAlgebra/NORM.dem.sce new file mode 100644 index 00000000..1de3feba --- /dev/null +++ b/demos/LinearAlgebra/NORM.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testnorm/testnorm.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testnorm"); + +editor(TMPDIR+"/main.c"); diff --git a/demos/LinearAlgebra/QR.dem.sce b/demos/LinearAlgebra/QR.dem.sce new file mode 100644 index 00000000..7d2fc1a3 --- /dev/null +++ b/demos/LinearAlgebra/QR.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testqr/testQR.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testqr"); + +editor(TMPDIR+"/main.c"); diff --git a/demos/LinearAlgebra/ROWCOMP.dem.sce b/demos/LinearAlgebra/ROWCOMP.dem.sce new file mode 100644 index 00000000..6557eb4c --- /dev/null +++ b/demos/LinearAlgebra/ROWCOMP.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testrowcomp/testrcomp.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testrowcomp"); + +editor(TMPDIR+"/main.c"); diff --git a/demos/LinearAlgebra/SPEC.dem.sce b/demos/LinearAlgebra/SPEC.dem.sce new file mode 100644 index 00000000..423c1520 --- /dev/null +++ b/demos/LinearAlgebra/SPEC.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testspec/testspec.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testspec"); + +editor(TMPDIR+"/main.c"); diff --git a/demos/LinearAlgebra/SQROOT.dem.sce b/demos/LinearAlgebra/SQROOT.dem.sce new file mode 100644 index 00000000..676d5e52 --- /dev/null +++ b/demos/LinearAlgebra/SQROOT.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testsqroot/testsqroot.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testsqroot"); + +editor(TMPDIR+"/main.c"); diff --git a/demos/LinearAlgebra/SVA.dem.sce b/demos/LinearAlgebra/SVA.dem.sce new file mode 100644 index 00000000..3ced74f5 --- /dev/null +++ b/demos/LinearAlgebra/SVA.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testsva/testsva.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testsva"); + +editor(TMPDIR+"/main.c"); diff --git a/demos/LinearAlgebra/SVD.dem.sce b/demos/LinearAlgebra/SVD.dem.sce new file mode 100644 index 00000000..aa35cce9 --- /dev/null +++ b/demos/LinearAlgebra/SVD.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/test_svd/testsvd.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/test_svd"); + +editor(TMPDIR+"/main.c"); diff --git a/demos/RPi/RPi.dem.gateway.sce b/demos/RPi/RPi.dem.gateway.sce new file mode 100644 index 00000000..c125e9c7 --- /dev/null +++ b/demos/RPi/RPi.dem.gateway.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Jorawar Singh, Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +subdemolist = ["Wait and Blink","test_wait_and_blink.dem.sce"; + "LCD","test_lcd.dem.sce" + ]; + +global SCI2CHOME; +subdemolist(:,2) = SCI2CHOME + "/demos/RPi/"+ subdemolist(:,2); diff --git a/demos/RPi/test_lcd.dem.sce b/demos/RPi/test_lcd.dem.sce new file mode 100644 index 00000000..2bd19516 --- /dev/null +++ b/demos/RPi/test_lcd.dem.sce @@ -0,0 +1,19 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Jorawar Singh, Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME + "/tests/unit_tests/test_RPi/lcd.sci", TMPDIR,SCI2CHOME + "/tests/unit_tests/test_RPi/", "All", "make" ,"RPi", "uno"); + +editor([TMPDIR+"/main.c"]); diff --git a/demos/RPi/test_wait_and_blink.dem.sce b/demos/RPi/test_wait_and_blink.dem.sce new file mode 100644 index 00000000..31396c60 --- /dev/null +++ b/demos/RPi/test_wait_and_blink.dem.sce @@ -0,0 +1,19 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Jorawar Singh, Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME + "/tests/unit_tests/test_RPi/wait_and_blink.sci", TMPDIR,SCI2CHOME + "/tests/unit_tests/test_RPi/", "All", "make" ,"RPi", "uno"); + +editor([TMPDIR+"/main.c"]); diff --git a/demos/ffilt.dem.sce b/demos/ffilt.dem.sce new file mode 100644 index 00000000..0268041a --- /dev/null +++ b/demos/ffilt.dem.sce @@ -0,0 +1,16 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +//This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ankit Raj +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/test_ffilt/scilabcode/main.sci",TMPDIR,SCI2CHOME+"/tests/unit_tests/test_ffilt/scilabcode"); diff --git a/demos/filt_sinc.dem.sce b/demos/filt_sinc.dem.sce new file mode 100644 index 00000000..001ceb87 --- /dev/null +++ b/demos/filt_sinc.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +//This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ankit Raj +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/test_filtsinc/scilabcode/filt_sinctest.sci",TMPDIR,SCI2CHOME+"/tests/unit_tests/test_filtsinc/scilabcode"); diff --git a/demos/fsfirlin.dem.sce b/demos/fsfirlin.dem.sce new file mode 100644 index 00000000..278252ae --- /dev/null +++ b/demos/fsfirlin.dem.sce @@ -0,0 +1,16 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +//This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ankit Raj +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/test_fsfirlin/scilabcode/main.sci",TMPDIR,SCI2CHOME+"/tests/unit_tests/test_fsfirlin/scilabcode"); diff --git a/demos/scilab2c.dem.gateway.sce b/demos/scilab2c.dem.gateway.sce index 71372e25..e84d5dc4 100644 --- a/demos/scilab2c.dem.gateway.sce +++ b/demos/scilab2c.dem.gateway.sce @@ -12,10 +12,17 @@ demopath = get_absolute_file_path("scilab2c.dem.gateway.sce"); -subdemolist = ["Trigonometric Identity" , "TrigonometricIdentity.dem.sce"; +subdemolist =["Linear Algebra","LinearAlgebra/LinearAlgebra.dem.gateway.sce"; + "Arduino","Arduino/Arduino.dem.gateway.sce"; + "Cosine Transforms","CT/CT.dem.gateway.sce"; + "Filters","Filters/Filters.dem.gateway.sce"; + "Raspberry Pi","RPi/RPi.dem.gateway.sce"; + "Trigonometric Identity" , "TrigonometricIdentity.dem.sce"; "Linear Regression" , "LinearRegression.dem.sce"; "Symbols", "Symbols.dem.sce"; - "High Pass Filter", "Filter.dem.sce"; - ]; - + "Jacobi functions","Jacobi.dem.sce"; + "String Functions","string.dem.sce"; + "Ffilt coeff. of FIR low pass filter","ffilt.dem.sce"; + "Design of FIR linear phase filters using freq. samping technique","fsfirlin.dem.sce"; + "Samples of sinc function","filt_sinc.dem.sce";] subdemolist(:,2) = demopath + subdemolist(:,2);
\ No newline at end of file diff --git a/demos/string.dem.sce b/demos/string.dem.sce new file mode 100644 index 00000000..db90905e --- /dev/null +++ b/demos/string.dem.sce @@ -0,0 +1,16 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +//This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ankit Raj +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/test_string/scilabcode/main.sci",TMPDIR,SCI2CHOME+"/tests/unit_tests/test_string/scilabcode"); |