summaryrefslogtreecommitdiff
path: root/2.3-1/demos/Abhinav_Demos/nan_sum.sci
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-07-29 02:38:28 +0530
committerAbhinav Dronamraju2017-07-29 02:38:28 +0530
commit81419aa6b4f55ae75192f704d2e52dbad3f34033 (patch)
treebec805df23a29ae83af9515f2bc551caee0fbded /2.3-1/demos/Abhinav_Demos/nan_sum.sci
parent4993d4e9ca9e47ebab20896cdcb0ee901c71fd5d (diff)
parentc9544c623c53e01c5e81709c92b25b6aa05bd7bd (diff)
downloadScilab2C-81419aa6b4f55ae75192f704d2e52dbad3f34033.tar.gz
Scilab2C-81419aa6b4f55ae75192f704d2e52dbad3f34033.tar.bz2
Scilab2C-81419aa6b4f55ae75192f704d2e52dbad3f34033.zip
Merge
Diffstat (limited to '2.3-1/demos/Abhinav_Demos/nan_sum.sci')
-rw-r--r--2.3-1/demos/Abhinav_Demos/nan_sum.sci35
1 files changed, 35 insertions, 0 deletions
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