Using Simulink    
Look-Up Table

Perform piecewise linear mapping of the input.

Library

Functions & Tables

Description

The Look-Up Table block maps an input to an output using linear interpolation of the values defined in the block's parameters.

You define the table by specifying (either as row or column vectors) the Vector of input values and Vector of output values parameters. The block produces an output value by comparing the block input with values in the input vector:

To map two inputs to an output, use the Look-Up Table (2-D) block. For more information, see Look-Up Table (2-D).

To create a table with step transitions, repeat an input value with different output values. For example, these input and output parameter values create the input/output relationship described by the plot that follows:

This example has three step discontinuities: at u = -1, 0, and +1.

When there are two points at a given input value, the block generates output according to these rules:

The Look-Up Table block icon displays a graph of the input vector versus the output vector. When a parameter is changed on the block's dialog box, the graph is automatically redrawn when you press the Apply or Close button.

Data Type Support

A Look-Up Table block accepts and outputs signals of type double.

Parameters and Dialog Box

Vector of input values
The vector of values containing possible block input values. This vector must be the same size as the output vector. The input vector must be monotonically increasing.
Vector of output values
The vector of values containing block output values. This vector must be the same size as the input vector.

Characteristics

Direct Feedthrough
Yes
Sample Time
Inherited from driving block
Scalar Expansion
No
Dimensionalized
Yes
Zero Crossing
No


 Logical Operator Look-Up Table (2-D)