Lookup Table Dynamic

Approximate one-dimensional function using dynamically specified table

Library

Lookup Tables

Description

The Lookup Table Dynamic block computes an approximation to some function y=f(x) given x, y data vectors. The lookup method can use interpolation, extrapolation, or the original values of the input.

The x data vector must be strictly monotonically increasing (i.e., the value of the next element in the vector is greater than the value of the preceding element) after conversion to the input's fixed-point data type. Note that due to quantization, the x data vector may be strictly monotonic in doubles format, but not so after conversion to a fixed-point data type.

You define the lookup table by inputting the x and y table data to the block as 1-by-n vectors. To help reduce the ROM used by the code generated for this block, you can use different data types for the x table data and the y table data. However, these restrictions apply:

The block generates output based on the input values using one of these methods selected from the Lookup Method parameter list:

Data Type Support

The Lookup Table Dynamic block accepts signals of any data type supported by Simulink® software, including fixed-point data types.

Parameters and Dialog Box

The Main pane of the Lookup Table Dynamic block dialog appears as follows:

Lookup Method

Specify the lookup method.

The Signal Attributes pane of the Lookup Table Dynamic block dialog appears as follows:

Output data type

Specify the output data type. You can set it to:

Click the Show data type assistant button to display the Data Type Assistant, which helps you set the Output data type parameter.

See Specifying Block Output Data Types for more information.

Lock output scaling against changes by the autoscaling tool

Select to lock scaling of outputs. This parameter is visible only if you enter an expression for the Output data type parameter.

Round toward

Rounding mode for the fixed-point output. For more information, see Rounding in the Simulink® Fixed Point™ User's Guide.

Saturate to max or min when overflows occur

If selected, fixed-point overflows saturate.

Examples

For an example that illustrates the lookup methods supported by this block, see the example included in the Lookup Table block reference pages.

Characteristics

Direct Feedthrough

Yes

Scalar Expansion

No

See Also

Lookup Table, Lookup Table (2-D), Lookup Table (n-D)

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS