count
Chart executions during which condition is valid
Syntax
Description
count(
returns the number of times that the chart has woken up since the conditional expressionC
)C
becametrue
and the associated state became active.
Examples
Tips
The Stateflow®chart resets the value of the
count
operator if the conditional expression becomesfalse
或者相关的状态变得不活跃。When a chart in a Simulink®model does not have input events, the value of
count
depends on the step size. Changing the solver or step size for the model affects the results produced by thecount
operator.To ensure that your Stateflow chart simulates without error, do not use count in these objects:
Continuous time charts
Graphical, MATLAB®, or Simulink functions
Simulink based states
反式itions that can be reached from multiple states
Default transitions