Next: taitt, Previous: t, Up: Internal Routines [Contents][Index]

`table(`

`x`, `y` [, `index`], `xnew` [, /all,
/middle])

`table`

interpolates in table

vs. `y`

at
positions `x`

. The first dimension of `xnew`

and
`x`

specifies the entries in one interpolation table. Second
and higher dimensions of `y`

and `x`

specify
individual interpolation tables. `y`

must be in ascending
order in its first dimension. Dimensions shared between `x`

and `x`

must be equal. Variables are repeated to accomodate
omitted dimensions. For example, if `y`

has dimensions
`x``[2,3]`

and

dimensions `y``[2,3,4,2]`

then

is repeated as needed to accomodate the third and fourth
dimensions of `x`

so that `y`

effectively has the
same dimensions as `x`

.
`y`

If no

is specified, then keyword `index``/all`

indicates that all values of

are to be used on each
interpolation table. In that case, the result will have all expect the
first of the (implied) dimensions of `xnew`

and `x`

,
and all the dimensions of `y`

, too.
`xnew`

If keyword `/all`

is not specified, then each one-dimensional
vector from

(e.g., `xnew`

(*,2)) is applied
to each next interpolation vector pair from `xnew`

and
`x`

(e.g., `y`

(*,2) and `x`

(*,2)). In
that case the second and higher dimensions of `y`

must
match the second and higher dimensions of `xnew`

and
`x`

, and the result will have the same dimensions (real or
implied) as `y`

. For example, if `xnew`

has
dimensions `x``[2,3]`

,

dimensions `y``[2,3,5]`

, and

dimensions `xnew``[4,3]`

, then the result will have
dimensions `[4,3,5]`

.

If

is specified, then it must be an array and each
element of it determines which interpolation table (counting all
dimensions of `index`

, `x`

except the first one) to
use for the corresponding element of `y`

. In that case,
dimensions shared between `xnew`

and `index`

must
be equal. Non-integer elements of `xnew`

are treated with
linear interpolation. The result gets all dimensions of the largest of
`index`

and `xnew`

.
`index`

Keyword `/middle`

(set by default) specifies that searching

for a value of `x`

starts in the middle
(and can then proceed either toward the beginning or the end of the
interpolation table). If `xnew``/nomiddle`

is specified, then searching
starts at the beginning.

In earlier versions of LUX, a routine `polate`

was available for
linear interpolation. This older routine has now been superseded by
`table`

, and `polate`

is now an alias of `table`

.

Alias: polate

See also: tense

Next: taitt, Previous: t, Up: Internal Routines [Contents][Index]