Stateflow | ![]() ![]() |
Specifying Fixed-Point Data in Stateflow
You can specify fixed-point data in Stateflow as follows:
This enables the Fixed-Point field Stored Integer and optional fields Fractional length and Scaling directly below the Type field.
Choose between the unsigned integer types uint8
, uint16
, and uint32
, and the signed integer types int8
, int16
, int32
.
[s b]
, in which the first element, s
, is the slope, and the second element, b
, is the bias. The slope must be greater than zero.
Note Values that you enter for Fraction length or Scaling that exceed the ranges specified in the previous sections are flagged immediately with red text. |
You can also specify a fixed-point constant indirectly in action language by using a fixed-point context-sensitive constant. See Fixed-Point Context-Sensitive Constants.
![]() | How Stateflow Implements Fixed-Point Data | Tips and Tricks for Using Fixed-Point Data in Stateflow | ![]() |