Main Content

Simulink.lookuptable.Breakpoint Class

Namespace: Simulink.lookuptable
Superclasses:

Configure breakpoint set data for lookup table object

Description

An object of the Simulink.lookuptable.Breakpoint class stores breakpoint set information for a lookup table. The object resides in the Breakpoints property of a Simulink.LookupTable object or Simulink.Breakpoint object.

You can use Simulink.LookupTable and Simulink.Breakpoint objects to store and configure a lookup table for ASAP2 and AUTOSAR code generation.

To represent multiple breakpoint sets for a multidimensional lookup table, store a vector of Simulink.lookuptable.Breakpoint objects in the Breakpoints property of a Simulink.LookupTable object.

To share a breakpoint set between multiple lookup tables, use a Simulink.Breakpoint object to store and configure the breakpoint set information. Use the object in a Prelookup block and create Simulink.LookupTable objects to use in Interpolation Using Prelookup blocks.

Construction

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

To create more Simulink.lookuptable.Breakpoint objects for a Simulink.LookupTable object, use this technique:

Access the Breakpoints property by specifying a vector index.

To create a Simulink.lookuptable.Breakpoint object, you can set the value of any of the object properties. The Simulink.LookupTable object creates the Simulink.lookuptable.Breakpoint object with default property values, and sets the property that you specified.

The value of the Breakpoints property is an array of Simulink.lookuptable.Breakpoint objects. Each embedded object represents one breakpoint set.

For example, suppose that you create a Simulink.LookupTable object named LUTObj. To create more breakpoint sets, access the Breakpoints property by specifying vector indices:

LUTObj.Breakpoints(1).Value = [-1 1];
LUTObj.Breakpoints(2).Value = [-2 -1 0 1 2];
LUTObj.Breakpoints(3).Value = [-5 -3 0 3 5];

The object LUTObj creates additional Simulink.lookuptable.Breakpoint objects and sets the Value property of each object. LUTObj now stores information for three breakpoint sets.

Properties

expand all

Data type of breakpoint set elements, specified as a character vector. You can explicitly specify an integer, half data type, a floating-point, 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 breakpoint set acquires 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 breakpoint data use the data type double. If you specify a typed expression such as single([1 2 3]) or an fi object, the breakpoint 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 breakpoint set, specified as a character vector.

Example: 'This breakpoint set represents the pressure input.'

Data Types: char

Dimension lengths of the breakpoint set, 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 breakpoint set data.

The code generator uses this property only under these circumstances, which cause the breakpoint data to appear in the generated code as a structure field:

  • The Simulink.lookuptable.Breakpoint object exists in a Simulink.LookupTable object and in the Simulink.LookupTable object you set BreakpointsSpecification to 'Explicit values'.

  • The Simulink.lookuptable.Breakpoint object exists in a Simulink.Breakpoint object and in the Simulink.Breakpoint object you set SupportTunableSize to true.

Example: 'MyBkptSet1'

Data Types: char

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

Example: 17.23

Data Types: double

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

Example: -52.6

Data Types: double

Name of a structure field in the generated code, specified as a character vector. This field stores the length of the breakpoint set, which the generated code algorithm uses to determine the size of the table. To tune the effective size of the table during code execution, change the value of this structure field in memory.

The code generator uses this property only under these circumstances, which enable a tunable table size in the generated code:

  • The Simulink.lookuptable.Breakpoint object exists in a Simulink.LookupTable object and in the Simulink.LookupTable object you set:

    • BreakpointsSpecification to 'Explicit values'.

    • SupportTunableSize to true.

  • The Simulink.lookuptable.Breakpoint object exists in a Simulink.Breakpoint object and in the Simulink.Breakpoint object you set SupportTunableSize to true.

Example: 'LengthForDim1'

Data Types: char

Physical unit of the elements of the breakpoint set, specified as a character vector.

Example: 'inches'

Data Types: char

The breakpoint set data, specified as a numeric vector with at least two elements. To control the data type of the breakpoint set, use the DataType property of the Simulink.lookuptable.Breakpoint 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]

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