Main Content

Simulink.lookuptable.Table Class

Namespace: Simulink.lookuptable
Superclasses:

Configure table data for lookup table object

Description

An object of the Simulink.lookuptable.Table class stores table information for a lookup table. The object resides 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.

Construction

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

Properties

expand all

Data type of the table data elements, specified as a character vector. 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

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

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

Data Types: char

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. 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

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.

Example: 'degC'

Data Types: char

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 of the Simulink.lookuptable.Table object.

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

Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects.

Version History

Introduced in R2016b