Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Using Multiword Fixed-point Data

This example shows a simple use of multiword fixed-point data in Stateflow® charts. Starting from R2010a, you can define multiword fixed-point data at the chart level, with one of the following scopes:

  • Input

  • Output

  • Parameter

  • Data Store Memory

You can also pass these data as inputs and outputs to and from MATLAB® functions, MATLAB® truth tables and Simulink® functions in Stateflow® charts.

Chart multiwordFixptIO takes in an input, data, that is a multiword fixed-point type, and returns an output, out, that is also a multiword fixed-point data type.

The chart defines a Simulink® function foo that declares both its input and output to be of multiword fixed-point type. foo returns the value of its input, incremented by a fixed-point constant value. At each time step, chart multiwordFixptIO passes its input to foo, and assigns foo's output to out.

Was this topic helpful?