summaryrefslogtreecommitdiff
path: root/demos/Abhinav_Demos/nan_sum.sci
diff options
context:
space:
mode:
authorBrijeshcr2017-07-28 21:15:34 +0530
committerBrijeshcr2017-07-28 21:15:34 +0530
commit4dbbef28f20d66f4d838a991e74311c921227ea2 (patch)
tree88bcb4910e1a000c37d227311af74f2cb32a203a /demos/Abhinav_Demos/nan_sum.sci
parentf321ea4dad9af5e029f39bb5b2cb6f359ecc8afe (diff)
parent1f639242264252674aaec1b2726a4389eed9a7c0 (diff)
downloadScilab2C_fossee_old-4dbbef28f20d66f4d838a991e74311c921227ea2.tar.gz
Scilab2C_fossee_old-4dbbef28f20d66f4d838a991e74311c921227ea2.tar.bz2
Scilab2C_fossee_old-4dbbef28f20d66f4d838a991e74311c921227ea2.zip
Test files added
Diffstat (limited to 'demos/Abhinav_Demos/nan_sum.sci')
-rw-r--r--demos/Abhinav_Demos/nan_sum.sci35
1 files changed, 35 insertions, 0 deletions
diff --git a/demos/Abhinav_Demos/nan_sum.sci b/demos/Abhinav_Demos/nan_sum.sci
new file mode 100644
index 0000000..b6d1017
--- /dev/null
+++ b/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