Skip to content

Lookup Table 1-D ​

Maps a double input through a table of breakpoints (x, y) to a double output. Linear interpolates between breakpoints; Nearest picks the closest breakpoint; Previous holds the y of the last breakpoint at or below the input (a staircase). Outside the table, Clamp holds the end values and Linear extends the first or last segment. The x column must be strictly increasing; if it is not, the simulator logs an error, sorts the rows and drops repeated x values. Type or paste the table (two columns, from a spreadsheet or CSV) in the properties dialog.

Category: Nonlinear

Ports ​

PortKindSignalNotes
inControl inputReal
outControl outputReal

Parameters ​

ParameterTypeDefaultUnitsDescriptionID
BreakpointsTable3 rows (Input x, Output y)—One row per breakpoint: input x and output y. x must be strictly increasing.table
InterpolationChoice: Linear / Nearest / PreviousLinear—Linear = straight line between breakpoints. Nearest = y of the closest breakpoint. Previous = y of the last breakpoint at or below the input.interpolation
Outside the tableChoice: Clamp / LinearClamp—Clamp = hold the first or last y. Linear = extend the first or last segment.extrapolation

In the course ​