summaryrefslogtreecommitdiff
path: root/2.3-1/demos/Brijesh_Demos/test_nanmean.sci
diff options
context:
space:
mode:
authorBrijeshcr2017-07-27 18:29:25 +0530
committerBrijeshcr2017-07-27 18:29:25 +0530
commit38a2d24e20e33da84432c068411dae980e32baeb (patch)
tree8cbfc698361666cbe8f46900d23821cc298792c5 /2.3-1/demos/Brijesh_Demos/test_nanmean.sci
parent965e05dc348f796d2741ac7f410bcaff2a3fef56 (diff)
downloadScilab2C-38a2d24e20e33da84432c068411dae980e32baeb.tar.gz
Scilab2C-38a2d24e20e33da84432c068411dae980e32baeb.tar.bz2
Scilab2C-38a2d24e20e33da84432c068411dae980e32baeb.zip
Nanmin and Nanmean added
Diffstat (limited to '2.3-1/demos/Brijesh_Demos/test_nanmean.sci')
-rw-r--r--2.3-1/demos/Brijesh_Demos/test_nanmean.sci14
1 files changed, 14 insertions, 0 deletions
diff --git a/2.3-1/demos/Brijesh_Demos/test_nanmean.sci b/2.3-1/demos/Brijesh_Demos/test_nanmean.sci
new file mode 100644
index 00000000..6009ad8a
--- /dev/null
+++ b/2.3-1/demos/Brijesh_Demos/test_nanmean.sci
@@ -0,0 +1,14 @@
+function test_nanmean
+ disp('Datatype: Double');
+ i1 = [1 %nan;3 4;5 %nan];
+ o1 = nanmean(i1,'r');
+ disp(o1);
+ disp('Datatype: Float');
+ i2 = float([1 %nan;3 4;5 %nan]);
+ o2 = nanmean(i2,'r');
+ disp(o2);
+ disp('Datatype: Double complex');
+ i3 = [1 %nan %i;3 4+1*%i %nan;5 %nan %i];
+ o3 = nanmean(i3,'c');
+ disp(o3);
+endfunction