Lookup Table

 

The Lookup Table block computes an approximation based on the given vectors of input values and output values using the specified lookup method. The length of the given vectors should be equal. Also, values in the input vector should be strictly monotonically increasing.

 

The Lookup method:

 

     Interpolation-Extrapolation

If the input signal is equal to an element of the input vector of the table, the output signal is the corresponding element in the output vector of the table.

If no element of the input vector is equal to the input signal, the block implements linear interpolation between the two closest elements of the input vector to determine the output value. If the input signal is less than the first or greater than the last element of the input vector, the block extrapolates the first two or last two elements of the input vector to obtain the output value.

 

     Interpolation-Use End Values

Same as the above interpolation, but does not extrapolate. Instead, the end element of the output vector is used as the output signal.

 

     Use Input Nearest

This method does not interpolate or extrapolate. Instead, the nearest element of the input vector to the input signal is selected and the corresponding element in the output vector is used for the output signal.

 

     Use Input Below

This method does not interpolate or extrapolate. Instead, the element of the input vector nearest and below the input signal is selected to find the corresponding element in the output vector. If no element is below the input signal, the nearest element is used.

 

     Use Input Above

This method does not interpolate or extrapolate. Instead, the element of the input vector nearest and above the input signal is selected to find the corresponding element in the output vector. If no element is above the input signal, the nearest element is used.

 

Dialog box

Figure 1  Lookup Table dialog box

 

Parameters

Parameter(s)

Description

Lookup method

Select a lookup method.

Input values

Enter the vector of input values.

Output values

Enter the vector of output values.

Sample time

Enter the time interval between samples.