Contenido principal

Simulink.lookuptable.Table

Configure table data for lookup table object

Description

A Simulink.lookuptable.Table object stores table information for a lookup table. The object is stored in the Table property of a Simulink.LookupTable object. You can use the Simulink.LookupTable object to store and configure a lookup table for ASAP2 and AUTOSAR code generation.

Creation

When you create a Simulink.LookupTable object, a Simulink.lookuptable.Table object is created as the value of its Table property.

Properties

expand all

Data type of the table data elements, specified as a character vector or string scalar. You can explicitly specify an integer data type, half data type, a floating-point data type, a fixed-point data type, or a data type expression such as the name of a Simulink.AliasType object.

The default value, "auto", means that the table data acquire a data type from the value that you specify in the Value property. If you use an untyped expression such as [1 2 3] to set Value, the table data use the data type double. If you specify a typed expression such as single([1 2 3]) or an fi object, the table data use the data type specified by the expression or object.

For more information about data types in Simulink®, see Data Types Supported by Simulink. To decide how to control the data types of table and breakpoint data in Simulink.LookupTable and Simulink.Breakpoint objects, see Control Data Types of Lookup Table Objects (Simulink Coder).

Example: "int16"

Example: "myTypeAlias"

Data Types: char | string

Description of the table data, specified as a character vector or string scalar.

Example: "This lookup table describes the action of a pump."

Data Types: char | string

Dimension lengths of the table data, returned as a numeric vector or specified as a character vector.

To use symbolic dimensions, specify a character vector.

Name of a structure field in the generated code, specified as a character vector or string scalar. This field stores the table data if you configure the Simulink.LookupTable object to appear in the generated code as a structure.

Example: "MyPumpTable"

Data Types: char | string

Maximum value of the elements of the table data, specified as a numeric, real value of the data type double.

Example: 17.23

Data Types: double

Minimum value of the elements of the table data, specified as a numeric, real value of the data type double.

Example: -52.6

Data Types: double

Physical unit of the elements of the table data, specified as a character vector or string scalar.

Example: "degC"

Data Types: char | string

The table data, specified as a numeric vector or multidimensional array with at least two elements. To control the data type of the table data, use the DataType property.

When you set DataType to 'auto', to set the Value property, use a typed expression such as single([1 2 3]) or use the fi (Fixed-Point Designer) constructor to embed an fi object.

Example: [10 20 30; 40 50 60]

Data Types: single | double | half | int8 | int16 | int32 | uint8 | uint16 | uint32 | fi

Version History

Introduced in R2016b