メインコンテンツ

Simulink.lookuptable.Breakpoint

Configure breakpoint set data for lookup table object

Description

A Simulink.lookuptable.Breakpoint object stores breakpoint set information for a lookup table. The object is stored 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.

Creation

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

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

  1. Access the Breakpoints property by specifying a vector index.

  2. Set the value of any of the object properties. A Simulink.lookuptable.Breakpoint object is created with the property value you specified and default values for all other properties.

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

For example, to create breakpoint sets for a Simulink.LookupTable object myLookupTable, access the Breakpoints property by specifying vector indices and assign value to one of its properties:

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

Properties

expand all

Data type of breakpoint set elements, specified as a character vector or string scalar. You can explicitly specify an integer, 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 a fi (Fixed-Point Designer) object, the breakpoint data uses 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 breakpoint set, specified as a character vector or string scalar.

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

Data Types: char | string

Dimensions 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 or string scalar. 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 | string

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 or string scalar. 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" and 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 | string

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

Example: "inches"

Data Types: char | string

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.

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

Version History

Introduced in R2016b