Selects data points from one series according to a "table" of point numbers contained in a second series. The point values isolated by this method are then plotted in the current Window.
LOOKUP(series1 , series2 , factor, offset)
series1 |
- |
A series or table, containing point numbers to be selected from series 2. Points in this series must be integers because they refer to point numbers and not y-values. |
series2 |
- |
Any series, table, or expression evaluating to a series or table. |
factor |
- |
Optional. A multiplicative factor for series 1, the "table" of point numbers. Defaults to 1.0. |
offset |
- |
Optional. An offset added to the table after multiplying by the factor argument. Defaults to 0.0. |
A series or table.
W1: gline(10, 0.1, 2, 1)
W2: {1, 2, 4, 5}
W3: lookup(W2, W1)
return the series {1, 1.2, 1.6, 1.8}. This is equivalent to using the array index syntax W1[W2].
lookup(W2, W1, 2, 1)
yields the series {1.4, 1.8, 2.6, 0.0}. The final 0.0 occurs because the fourth value in the lookup table is 5 which, when multiplied by 2 and added to 1, yields 11. There is no 11th point in the target series, so the default y value is 0.
Use factor and offset arguments to adjust the x-axis units.