IDXTOX

Purpose:

Converts index values of a series to X values.

Syntax:

IDXTOX(series, idx)

series

-

An input series

idx

-

An integer or a series of integers. The indices ranging from SPL_START_INDEX (usually 1) to length(s).

Returns:

A real or series.

Example:

W1: 1..0.1..10

W2: idxtox(W1, 1..6)

 

W2 contains the series {1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6}, the first 6 X values of W1.

Example:

W3: gsin(10, .1, 1)

idxto(W3, 2)

 

returns 0.1, the second X value of series.

Remarks:

Indices start at 1 unless STARTINDEX is invoked or the SPL_START_INDEX configuration parameter is set.

 

For XY or XYZ series, the indices are looked up and the closest matches are returned.

 

For interval series, the X values are computed as follows:

 

x = (idx - start) * deltax(s) + xoffset(s)

 

where start is the value of STARTINDEX or SPL_START_INDEX (usually 1).

See Also:

IDX

STARTINDEX

XTOIDX

XVALS