DADiSP Worksheet Functions > Function Categories > Statistics and Calculus > COLMEDIAN
Produces a row of the medians of each column of the input table.
COLMEDIAN(a)
a |
- |
A series or table. |
A one-row table with the same number of columns as the input table.
colmedian(ravel({1,2,3},{2,3,4}))
returns {{2, 3}}
W1: {{139, 59, 6},
{ 66, 30, -149},
{-34, 60, 133},
{-93, 26, -3},
{-81, -177, 10}}
W2: sort(W1, 1)
W3: colmedian(W1)
W4: {median(W1)}
W2 == {{-93, -177, -149},
{-81, 26, -3},
{-34, 30, 6},
{ 66, 59, 10},
{139, 60, 133}}
W3 == {{-34, 30, 6}}
W4 == {10}
W2 contains each column of W1 sorted in ascending order.
W3 contains the median value of each column of W1. The median values are equal to the 3rd row of W2.
W4 contains the median value of all the values in W1.
See MEDIAN to compute the median of the entire series.
See MOVMEDIAN to compute the moving median of a series.
See BLOCKMEDIAN to compute the non-overlapping block median of a series.