summaryrefslogtreecommitdiff
path: root/demos/Abhinav_Demos/med.sci
diff options
context:
space:
mode:
Diffstat (limited to 'demos/Abhinav_Demos/med.sci')
-rw-r--r--demos/Abhinav_Demos/med.sci66
1 files changed, 66 insertions, 0 deletions
diff --git a/demos/Abhinav_Demos/med.sci b/demos/Abhinav_Demos/med.sci
new file mode 100644
index 0000000..821ca1f
--- /dev/null
+++ b/demos/Abhinav_Demos/med.sci
@@ -0,0 +1,66 @@
+function med()
+
+a=float([12,287,312,52; 4,5,456,512; 12, 4, 6,213])
+
+
+disp('Float')
+
+
+disp(median(a, 'r'))
+disp('')
+
+disp(median(a, 'c'))
+disp('')
+
+disp(median(a))
+disp('')
+
+
+b=[12,287,312,52; 4,5,456,512; 12, 4, 6,213]
+
+
+disp('Double')
+
+
+disp(median(b, 'r'))
+disp('')
+
+disp(median(b, 'c'))
+disp('')
+
+disp(median(b))
+disp('')
+
+
+
+disp('uint16')
+
+
+c=uint16([12,287,312,52; 4,5,456,512; 12, 4, 6,213])
+disp(median(c, 'r'))
+disp('')
+
+disp(median(c, 'c'))
+disp('')
+
+disp(median(c))
+disp('')
+
+
+disp('doubleComplex')
+
+
+d= [%i*21, 65+%i*7, %i*121, 56; %i*6112, 12 ,3, 0]
+disp(median(d, 'r'))
+disp('')
+
+disp(median(d, 'c'))
+disp('')
+
+disp(median(d))
+disp('')
+
+
+
+endfunction
+