FINDVAL

Purpose:

Returns the X and Y values of a series from a specified Y value.

Syntax:

FINDVAL(series, val)

(x, y) = FINDVAL(series, val)

series

-

A series.

val

-

A real or series. The values to search.

Returns:

An XY series or separate scalars:

 

b = FINDVAL(series, val)

 

returns an XY series.

 

(x, y) = FINDVAL(series, val)

 

returns the X and Y values as separate scalars.

Example:

a = {1, 12, 0, 5};

b = findval(a, 0);

(x, y) = findval(a, 0);

 

b == xy({2}, {0})

x == 2.0

y == 0.0

 

W1: gnorm(100,.1);overp(findval(curr,max),lred);setsym(CIRCLE,2)

 

marks the MAX of W1 with a red circle.

Remarks:

FINDVAL returns an XY series with the same units as the input series. Multiple x values can be returned if val occurs multiple times in the series.

 

(x, y) = findval(series, val) returns the first occurrence of val in series.

See Also:

FIND

FINDMAX

FINDMIN