diff options
Diffstat (limited to 'demos/Abhinav_Demos/nan_max.sci')
-rw-r--r-- | demos/Abhinav_Demos/nan_max.sci | 48 |
1 files changed, 41 insertions, 7 deletions
diff --git a/demos/Abhinav_Demos/nan_max.sci b/demos/Abhinav_Demos/nan_max.sci index ce7e10e..c840e06 100644 --- a/demos/Abhinav_Demos/nan_max.sci +++ b/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 |