%% |If-then-else| Pattern with an Unconditional Transition
% In this example, the transition from state |Start| has three connective
% junctions. The first two branches of the path are guarded by a condition.
% The last branch of the path is unconditional.

% Copyright 2018-2020 The MathWorks, Inc.

%%

% Set up charts with white background
set_param(0,'ExportBackgroundColorMode','white');

model = 'sf_temporal_logic_from_junction';
load_system(model);

open_system([model '/Chart'])

%%
% The chart uses temporal logic to determine when the input |u| equals 1:
%
% * If |u| equals 1 before time $t=2$, the state |Fast| becomes active.
% * If |u| equals 1 between $t=2$ and $t=5$, the state |Good| becomes
% active.
% * If |u| equals 1 after $t=5$, the state |Slow| becomes active.
% 
% For more information about this chart, see <docid:stateflow_ug#bsjbdzm
% Example of Detecting Elapsed Time>.