Stateflow® provides an editor and graphical objects for drawing state machines and flow charts. You build a state machine with states, actions, conditions, transitions, and junctions. Stateflow syntax provides event-based and time-based operators so that you can specify state-transition logic. Define conditions and actions in C or in MATLAB®.