COLMINIDX

Purpose:

Returns a row of indices for the minimums of each column of the input table.

Syntax:

COLMINIDX(a, unravel)

a

-

A series or multi-column table.

unravel

-

Optional. An integer indicating if "unraveled" (i.e. sequential) indices should be returned:

0:

Normal indices (default)

1:

Unraveled (sequential) indices

Returns:

A row series.

Example:

W1: {{1, 2, 3},

     {2, 1, 3}, 

     {3, 2, 1}} 

 

W2: colminidx(w1)

 

W2 == {1, 2, 3}

Example:

a = colminidx(W1, 1)

b = colmin(W1)

c = W1[a]

 

a == {{1, 5, 9}}

b == c == {{1, 1, 1}}

Remarks:

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.

See Also:

COLLENGTH

COLMAX

COLMAXIDX

COLMIN

FIND

FMAX

FMIN

MAXLOC

MAXVAL

MIN

MINIDX

MINLOC