IDX

Purpose:

Returns the indices of a series or array.

Syntax:

IDX(series, unravel)

series

-

An input series

unravel

-

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

0:

Normal indices

1:

Unraveled indices (default)

Returns:

An array or series.

Example:

W1: gnorm(5, 1)

W2: idx(W1)

 

W2 == {1, 2, 3, 4, 5}

 

W1: {{1, 2, 3},

     {2, 1, 3}, 

     {3, 2, 1}} 

 

W2: idx(w1)

 

W2 == {{1, 4, 7},

       {2, 5, 8}, 

       {3, 6, 9}} 

 

a = idx(W1, 0)

 

a == {{1, 1, 1},

      {2, 2, 2}, 

      {3, 3, 3}} 

Remarks:

By default, IDX(a) returns the indices in sequential, unraveled order. This form is useful in array reference expressions.

 

idx(a, 0) == colidx(a)

 

Use XVALS to return the X axis values.

 

See IDXTOX to convert indices to X values.

See Also:

COLIDX

COLLENGTH

IDXTOX

XVALS