| Stateflow® | ![]() |
| On this page… |
|---|
Define temporary data when you want to use data that persists only while a function executes. You can define temporary data in graphical, truth table, and Embedded MATLAB™ functions. For example, you can designate a loop counter to have Temporary scope if the counter value does not need to persist after the function completes.
To define temporary data for a Stateflow® function, follow these steps:
In the Stateflow Editor, select Tools > Explore.
The Model Explorer appears.
In the Model Hierarchy pane of the Model Explorer, select the graphical, truth table, or Embedded MATLAB function that will use temporary data.
Select Add > Data, or click the Add Data button:
![]()
The Model Explorer adds a default definition for the data in the Stateflow hierarchy, with a scope set to Temporary by default.

Change other properties of the data if necessary, as described in Setting Data Properties in the Data Dialog.
![]() | Sizing Stateflow® Data | Resolving Data Properties from Simulink® Signal Objects | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |