# PS Lookup Table (1D)

Approximate one-dimensional function using specified lookup method

**Libraries:**

Simscape /
Foundation Library /
Physical Signals /
Lookup Tables

## Description

The PS Lookup Table (1D) block computes an
approximation to some function `f=f(x)`

by interpolating the input
query point coordinates against a one-dimensional lookup table.

You define the lookup table by specifying the **Table grid vector**
parameter (vector of data points along the *x* axis) and the
**Table values** parameter (vector of corresponding function
values). The length of these two vectors must match. Also, the `x`

data
vector must be strictly monotonic, either increasing or decreasing.

The block input and output are physical signals of matching size. The block generates the output based on the input query and the table grid lookup, using the selected interpolation and extrapolation methods. You have a choice of two interpolation methods and two extrapolation methods. You also have an option for the block to issue an error if the input signal value is outside the table grid vector range.

### Plotting Table Data

Plotting a lookup table lets you visualize the data before simulating the model, to make sure that the table is correct. The plot reflects tabulated data specified for the block, as well as the selected interpolation and extrapolation options.

To plot the data, right-click the block in your model and, from the context menu,
select **Foundation Library** > **Plot
Table**. For more information, see Plot Lookup Tables.

## Examples

## Ports

### Input

### Output

## Parameters

## Extended Capabilities

## Version History

**Introduced in R2007a**