DADiSP Worksheet Functions > A - E > COLMINIDX
Returns a row of indices for the minimums of each column of the input table.
COLMINIDX(a, unravel)
a |
- |
A series or multi-column table. |
||||
unravel |
- |
Optional. An integer indicating if "unraveled" (i.e. sequential) indices should be returned:
|
A row series.
W1: {{1, 2, 3},
{2, 1, 3},
{3, 2, 1}}
W2: colminidx(w1)
W2 == {1, 2, 3}
a = colminidx(W1, 1)
b = colmin(W1)
c = W1[a]
a == {{1, 5, 9}}
b == c == {{1, 1, 1}}
COLMINIDX finds the index of the minimum value for each column in an array. If more than one minimum exists per column, the first index found is returned.
COLMINIDX(a, 1) returns the indices in sequential, unraveled order. This form is useful in array reference expressions.
Use MINIDX to find the index of the overall minimum.