diff options
Diffstat (limited to '2.3-1/demos/Abhinav_Demos')
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/column.sci (renamed from 2.3-1/demos/Abhinav_Demos/Column.sci) | 2 | ||||
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/matrix_reshape.sci (renamed from 2.3-1/demos/Abhinav_Demos/matrixreshape.sci) | 2 | ||||
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/nan_max.sci | 40 | ||||
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/nan_median.sci | 33 | ||||
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/non_zero.sci | 15 | ||||
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/nth_root.sci (renamed from 2.3-1/demos/Abhinav_Demos/nthroot1.sci) | 2 | ||||
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/row.sci (renamed from 2.3-1/demos/Abhinav_Demos/Row.sci) | 0 |
7 files changed, 59 insertions, 35 deletions
diff --git a/2.3-1/demos/Abhinav_Demos/Column.sci b/2.3-1/demos/Abhinav_Demos/column.sci index b9dc55bd..82209876 100644 --- a/2.3-1/demos/Abhinav_Demos/Column.sci +++ b/2.3-1/demos/Abhinav_Demos/column.sci @@ -3,7 +3,7 @@ //The function written doesn't work for string or character scalar as of now. -function Column() +function column() a=[1,2,3,4; 5,6,7,8; 98,162,6587,0] disp( iscolumn(a)) disp('') diff --git a/2.3-1/demos/Abhinav_Demos/matrixreshape.sci b/2.3-1/demos/Abhinav_Demos/matrix_reshape.sci index 38fa0a53..bf7fbbc8 100644 --- a/2.3-1/demos/Abhinav_Demos/matrixreshape.sci +++ b/2.3-1/demos/Abhinav_Demos/matrix_reshape.sci @@ -1,7 +1,7 @@ // Test file for "matrix" function for the data types double, float, double complex, uint16 -function matrixreshape() +function matrix_reshape() a=[1,2,3,4;5,6,7,8;8,9,1,2] b=float(a) c= uint16(b) diff --git a/2.3-1/demos/Abhinav_Demos/nan_max.sci b/2.3-1/demos/Abhinav_Demos/nan_max.sci index 769a92a7..ce7e10ef 100644 --- a/2.3-1/demos/Abhinav_Demos/nan_max.sci +++ b/2.3-1/demos/Abhinav_Demos/nan_max.sci @@ -1,33 +1,9 @@ -function nan_max() - -x=[%nan 0.121 %nan 0.5 0.8; 0.12 %nan 9 12 %nan] - -disp('Double') - -disp(nanmax(x)) -disp('') - -disp(nanmax(x , 'r')) -disp('') - -disp(nanmax(x, 'c')) -disp('') - -y= uint16(x) - -disp('Float') - -disp(nanmax(y)) -disp('') - -disp(nanmax(y , 'r')) -disp('') - -disp(nanmax(y, 'c')) -disp('') - - - - +function nan_max + x= double([1 2 1 0.8; 21 1 13 0.1]) + [a,b]= nanmin(x) + disp(a) + disp('') + disp(b) + disp('') + endfunction - diff --git a/2.3-1/demos/Abhinav_Demos/nan_median.sci b/2.3-1/demos/Abhinav_Demos/nan_median.sci new file mode 100644 index 00000000..993b2d72 --- /dev/null +++ b/2.3-1/demos/Abhinav_Demos/nan_median.sci @@ -0,0 +1,33 @@ +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/2.3-1/demos/Abhinav_Demos/non_zero.sci b/2.3-1/demos/Abhinav_Demos/non_zero.sci new file mode 100644 index 00000000..3e2b3ba9 --- /dev/null +++ b/2.3-1/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/2.3-1/demos/Abhinav_Demos/nthroot1.sci b/2.3-1/demos/Abhinav_Demos/nth_root.sci index 201338b3..13e4223e 100644 --- a/2.3-1/demos/Abhinav_Demos/nthroot1.sci +++ b/2.3-1/demos/Abhinav_Demos/nth_root.sci @@ -1,7 +1,7 @@ // Test file for "nthroot" function for the data types double, float, double complex. -function nthroot1() +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) diff --git a/2.3-1/demos/Abhinav_Demos/Row.sci b/2.3-1/demos/Abhinav_Demos/row.sci index 264b174a..264b174a 100644 --- a/2.3-1/demos/Abhinav_Demos/Row.sci +++ b/2.3-1/demos/Abhinav_Demos/row.sci |