sf_fxptgf (Simulink model) Open this Model

Fixed-Point Graphical Functions

Fixed-point data types can also be used as inputs to Graphical Functions within Stateflow. In this demonstration, we provide a 16 bit signed input to the Stateflow chart from Simulink and send out double. Within the chart, a graphical function uses takes the input and multiplies it by 3 if the value is greater than or equal to zero or by -3 if the value is less than zero. The output is then converted back to a double-precision float and sent to a scope block.