diff options
Diffstat (limited to '2.3-1/demos/Abhinav_Demos')
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/nan_max.sci | 48 | ||||
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/nan_median.sci | 2 | ||||
-rw-r--r-- | 2.3-1/demos/Abhinav_Demos/nan_sum.sci | 35 |
3 files changed, 76 insertions, 9 deletions
diff --git a/2.3-1/demos/Abhinav_Demos/nan_max.sci b/2.3-1/demos/Abhinav_Demos/nan_max.sci index ce7e10ef..c840e069 100644 --- a/2.3-1/demos/Abhinav_Demos/nan_max.sci +++ b/2.3-1/demos/Abhinav_Demos/nan_max.sci @@ -1,9 +1,43 @@ -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('') +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/2.3-1/demos/Abhinav_Demos/nan_median.sci b/2.3-1/demos/Abhinav_Demos/nan_median.sci index 993b2d72..f2b350c0 100644 --- a/2.3-1/demos/Abhinav_Demos/nan_median.sci +++ b/2.3-1/demos/Abhinav_Demos/nan_median.sci @@ -27,7 +27,5 @@ disp(nanmedian(y, 'c')) disp('') - - endfunction diff --git a/2.3-1/demos/Abhinav_Demos/nan_sum.sci b/2.3-1/demos/Abhinav_Demos/nan_sum.sci new file mode 100644 index 00000000..b6d10173 --- /dev/null +++ b/2.3-1/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 |