select

(function for equations)

 

Usage:

select0 (index, x0, x1, ... xn)

select1 (index, x1, x2, ... xn)

Definition:

xi s.t. i == index

Required:

index is integer, xi are all the same type

select0:  0 ⋜ index < n

select1:  1 < index ⋜ n

Returns the value of the x argument at position index: x[index]

The first x argument is at index 0 if select0 is used, and at index 1 if select1 is used.

Must be passed at least 2 arguments (index and an x).

For the inverse function, see nearest.

 

Examples:

select0 (1, -6.6, 3.4, 1.26, 3.4)  returns 3.4

 

select1 (1, -6.6, 3.4, 1.26)       returns –6.6