I have a 10 x 10 array of values, A. I need the median, M, of all of those values. I can find the medians along the rows or along the columns easily:
M = median(A,1) %or
M = median(A,2)
However, M = median(A) also returns the medians along the rows.
How can I find a single median of ALL the values? I know I could convert the array to one very very long vector, but that seems unpleasant and inefficient. Is there a simpler solution? I would like to be able to do this for multi-dimensional arrays as well.
Thanks!