Fixed-Point Blockset    
Look-Up Table Dynamic

Approximate a one-dimensional function using a selected look-up method and a dynamically specified table

Library

LookUp

Description

The Look-Up Table Dynamic block is a masked S-function that computes an approximation to some function y=f(x) given x, y data vectors. The look-up method can use interpolation, extrapolation, or the original values of the input.

The x data vector must be strictly monotonically increasing 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 look-up 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 Look-up method parameter list:

For a detailed description of all other block parameters, refer to Block Parameters.

Parameters and Dialog Box

Look-Up Method
Look-up method.
Output data type and scaling
Specify the output data type and scaling via the dialog box, or inherit the data type and scaling by backpropagation.
Output data type
Any data type supported by the Fixed-Point Blockset.
Output scaling
Set the output scaling using radix point-only or [Slope Bias] scaling. These scaling modes are available only for generalized fixed-point data types.
Lock output scaling so autoscaling tool can't change it
If selected, Output scaling is locked. This feature is available only for generalized fixed-point output.
Round toward
Rounding mode for the fixed-point output.
Saturate to max or min when overflows occur
If selected, fixed-point overflows saturate.

Conversions

The table data is converted from doubles to the x data type. This conversion is performed offline using round-to-nearest and saturation. Refer to Parameter Conversions for more information about parameter conversions.

Examples

For an example that illustrates the look-up methods supported by this block, see the example included in the Look-Up Table block reference pages.

Characteristics

Input Port(s)
Any data type supported by the blockset
Output Port
Any data type supported by the blockset
Direct Feedthrough
Yes
Scalar Expansion
No

See Also

Look-Up Table, Look-Up Table (2-D)


  Look-Up Table Look-Up Table (2-D)