Documentation

Simulink.lookuptable.Breakpoint class

Package:Simulink.lookuptable
Superclasses:

Configure breakpoint set data for lookup table object

Description

An object of theSimulink.lookuptable.Breakpointclass stores breakpoint set information for a lookup table. The object resides in theBreakpoints的属性aSimulink.LookupTableobject orSimulink.Breakpointobject.

You can useSimulink.LookupTableandSimulink.Breakpointobjects 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 ofSimulink.lookuptable.Breakpointobjects in theBreakpoints的属性aSimulink.LookupTableobject.

To share a breakpoint set between multiple lookup tables, use aSimulink.Breakpointobject to store and configure the breakpoint set information. Use the object in aPrelookupblock and createSimulink.LookupTableobjects to use inInterpolation Using Prelookupblocks.

Construction

When you create aSimulink.LookupTableobject orSimulink.Breakpointobject, aSimulink.lookuptable.Breakpointobject appears as the value of theBreakpointsproperty.

To create moreSimulink.lookuptable.Breakpointobjects for aSimulink.LookupTableobject, use this technique:

Access theBreakpointsproperty by specifying a vector index.

To create aSimulink.lookuptable.Breakpointobject, you can set the value of any of the object properties. TheSimulink.LookupTableobject creates theSimulink.lookuptable.Breakpointobject with default property values, and sets the property that you specified.

The value of theBreakpointsproperty is an array ofSimulink.lookuptable.Breakpointobjects. Each embedded object represents one breakpoint set.

For example, suppose that you create aSimulink.LookupTableobject namedLUTObj. To create more breakpoint sets, access theBreakpoints属性指定向量指标:

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 objectLUTObjcreates additionalSimulink.lookuptable.Breakpointobjects and sets theValue的属性each object.LUTObjnow 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, a floating-point, a fixed-point data type, or a data type expression such as the name of aSimulink.AliasTypeobject.

The default value,'auto', means that the breakpoint set acquires a data type from the value that you specify in theValueproperty. If you use an untyped expression such as[1 2 3]to setValue, the breakpoint data use the data typedouble. If you specify a typed expression such assingle([1 2 3])or anfiobject, the breakpoint data use the data type specified by the expression or object.

For more information about data types in Simulink®, seeData Types Supported by Simulink. To decide how to control the data types of table and breakpoint data inSimulink.LookupTableandSimulink.Breakpointobjects, seeControl 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.

生成的代码结构字段名称,年代pecified 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:

  • TheSimulink.lookuptable.Breakpointobject exists in aSimulink.LookupTableobject and in theSimulink.LookupTableobject you setBreakpointsSpecificationto'Explicit values'.

  • TheSimulink.lookuptable.Breakpointobject exists in aSimulink.Breakpointobject and in theSimulink.Breakpointobject you setSupportTunableSizetotrue.

Example:'MyBkptSet1'

Data Types:char

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

Example:17.23

Data Types:double

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

Example:-52.6

Data Types:double

生成的代码结构字段名称,年代pecified 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:

  • TheSimulink.lookuptable.Breakpointobject exists in aSimulink.LookupTableobject and in theSimulink.LookupTableobject you set:

    • BreakpointsSpecificationto'Explicit values'.

    • SupportTunableSizetotrue.

  • TheSimulink.lookuptable.Breakpointobject exists in aSimulink.Breakpointobject and in theSimulink.Breakpointobject you setSupportTunableSizetotrue.

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 theDataType的属性theSimulink.lookuptable.Breakpointobject.

When you setDataTypeto'auto', to set theValueproperty, use a typed expression such assingle([1 2 3])or use theficonstructor to embed anfiobject.

Example:[10 20 30]

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

Copy Semantics

Value. To learn how value classes affect copy operations, seeCopying Objects(MATLAB).

Introduced in R2016b

Was this topic helpful?