Using Simulink    
Look-Up Table (2-D)

Perform piecewise linear mapping of two inputs.

Library

Functions & Tables

Description

The Look-Up Table (2-D) block maps the block inputs to an output using linear interpolation of a table of values defined by the block's parameters.

You define the possible output values as the Table parameter. You define the values that correspond to its rows and columns with the Row and Column parameters. The block generates an output value by comparing the block inputs with the Row and the Column parameters. The first input identifies a row, and the second input identifies a column, as shown by this figure.

The block generates output based on the input values:

If either the Row or Column parameter has a repeating value, the block chooses a value using the technique described for the Look-Up Table block.

The Look-Up Table block allows you to map a single input value into a vector of output values (see Look-Up Table).

Example

In this example, the block parameters are defined as:

The first figure shows the block outputting a value at the intersection of block inputs that match row and column values. The first input is 1 and the second input is 4. These values select the table value at the intersection of the first row (row parameter value 1) and second column (column parameter value 4).

In the second figure, the first input is 1.7 and the second is 3.4. These values cause the block to interpolate between row and column values, as shown in the table at the left. The value at the intersection (28) is the output value.

Data Type Support

A Look-Up Table (2-D) block accepts and outputs signals of type double.

Parameters and Dialog Box

Row
The row values for the table, entered as a vector. The vector values must increase monotonically.
Column
The column values for the table, entered as a vector. The vector values must increase monotonically.
Table
The table of output values. The matrix size must match the dimensions defined by the Row and Column parameters.

Characteristics

Direct Feedthrough
Yes
Sample Time
Inherited from driving blocks
Scalar Expansion
Of one input if the other is a vector
Dimensionalized
Yes
Zero Crossing
No


 Look-Up Table Look-Up Table (n-D)