%% Detect Elapsed Time
% In this example, a <docid:simulink_ref#f8-894202 Step> block provides a
% unit step input to a Stateflow chart.

% 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 determines when the input |u| equals 1:
%
% * If the input equals 1 before t = 2 seconds, a transition occurs from
% |Start| to |Fast|.
% * If the input equals 1 between t = 2 and t = 5 seconds, a transition
% occurs from |Start| to |Medium|.
% * If the input equals 1 after t = 5 seconds, a transition occurs from
% |Start| to |Slow|.
