YTOIDX

Purpose:

Converts Y values of a series to index values.

Syntax:

YTOIDX(series, y)

series

-

An input series

y

-

A real or a series of reals. The Y values to convert to indices.

Returns:

An integer or series of integers.

Example:

W1: 1..0.1..10

W2: ytoidx(W1, 1..0.1..1.5)

 

W2 contains the series {1, 2, 3, 4, 5, 6}, the first 6 index values of W1.

Example:

W1: 1..0.1..10

W2: ytoidx(W1, 5..10)

W3: W1[W2]

 

W1 contains a series with values from 1 to 10 with a step size of 0.1.

 

W2 returns the indices of W1 that correspond to the Y values {5, 6, 7, 8, 9, 10}.

 

W3 uses the indices contained in W2 to return the corresponding Y values of W1. The result is also equal to {5, 6, 7, 8, 9, 10}.

Remarks:

The indices are looked up and the closest matches are linearly interpolated for accuracy.

 

See XTOIDX to convert X values to indices.

 

See IDXTOY to convert indices to Y values.

See Also:

IDX

IDXTOX

XTOIDX

STARTINDEX

IDXTOY

YVALS