diff options
Diffstat (limited to '2.3-1/demos')
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/test_gsort.sci | 81 | ||||
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/test_pertrans.sci | 31 | ||||
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/test_rank.sci | 20 |
3 files changed, 132 insertions, 0 deletions
diff --git a/2.3-1/demos/Abhinav_Demos/test_gsort.sci b/2.3-1/demos/Abhinav_Demos/test_gsort.sci new file mode 100644 index 00000000..bd51c697 --- /dev/null +++ b/2.3-1/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/2.3-1/demos/Abhinav_Demos/test_pertrans.sci b/2.3-1/demos/Abhinav_Demos/test_pertrans.sci new file mode 100644 index 00000000..a84f7257 --- /dev/null +++ b/2.3-1/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/2.3-1/demos/Abhinav_Demos/test_rank.sci b/2.3-1/demos/Abhinav_Demos/test_rank.sci new file mode 100644 index 00000000..95f4a7dc --- /dev/null +++ b/2.3-1/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 |