Lookup Table (2D)

 

The Lookup Table (2D) block computes an approximation of output value with given values of two (2D) inputs and outputs using the specified lookup method. If the Row index of one input parameter is a 1-by-m vector and the Column index of the other input parameter is a 1-by-n vector, the Matrix of output parameter should be an m-by-n matrix. Also, the Row and Column values of input parameters should be strictly monotonically increasing.

 

The Lookup method:

 

     Interpolation-Extrapolation

If the input signals are equal to an element of the Row index and an element of the column index, respectively, the output signal is the corresponding element in the output matrix of the table.

If the input signals are not equal to elements of the Row and Column index of the input parameters, the block implements a linear interpolation between the appropriate elements of the Row and Column index of the input parameters to determine an output value. If either or both the input signals are less than the first or greater than the last elements of the Row or Column index of the input parameters, the block extrapolates using the first two or last two elements of the Row or Column index of the input parameters.

 

     Interpolation-Use End Values

Same as the above interpolation, but does not extrapolate. Instead, the end elements of the Row and Column index of the input parameters are used to determine the output signal.

 

     Use Input Nearest

This method does not interpolate or extrapolate. Instead, the elements of the Row and Column index of the input parameters nearest to the input signals are selected and the corresponding element in the Matrix of the output parameter is used for the output signal.

 

     Use Input Below

This method does not interpolate or extrapolate. Instead, the elements of the Row and Column index of the input parameters nearest and below the input signals are selected to find the corresponding element in the Matrix of the output parameter. If no element is below the input signals, the nearest element is used.

 

     Use Input Above

This method does not interpolate or extrapolate. Instead, the elements of the Row and Column index of the input parameters nearest and above the input signals are selected to find the corresponding element in the Matrix of the output parameter. If no element is above the input signals, the nearest element is used.

 

Dialog box

Figure 1  Lookup Table (2D) dialog box

 

Parameters

Parameter(s)

Description

Lookup method

Select a lookup method.

Row index of input values

Enter the values for an input parameter.

Column index of input values

Enter the values for the other input parameter.

Matrix of output values

Enter the matrix of output values.

Sample time

Enter the time interval between samples.