Stateflow User's Guide Previous page   Next Page

Inheriting Input and Output Data Size from Simulink

You can tell the Stateflow block to inherit the size of input data and output data from Simulink by entering a -1 in the Size field for that data. This is the default setting for input and output data that you add to a Stateflow chart. Once you build the model, the CompiledSize column of the Model Explorer gives the actual size used in the compiled simulation application.

In the preceding example, the input data invals is connected to a Constant block that specifies a four-element vector. The CompiledSize field displays the correct inherited size of 4 for invals.

Inheriting the size of input data is complete for all cases. The inherited size of output data is inferred from diagram actions that store values in the specified output. If the expected size in Simulink matches the inferred size, inheritance is successful. In all other cases, a mismatch occurs during build time.


Previous page  Sizing Stateflow Data Sizing Data by Expression Next page

© 1994-2005 The MathWorks, Inc.