%% Use Bilevel Measurements Panel with Clock Input Signal
% This example shows how to use the Time Scope Bilevel Measurements panel.
% At the MATLAB® command prompt, type ex_timescope_clockex to open the example model. The following Simulink® model appears.
%
% In this example, Simulink® imports the variable x, from the MATLAB® workspace. This variable is created when the model loads because the commands that construct it reside in the model Preload function. To view these commands, in the Simulink® menu, select File > Model Properties > Model Properties. The Model Properties dialog box appears. Click the  Callbacks tab. The following lines of MATLAB® code appear.

load clockex;
ts = t(2)-t(1);

% Run your model to see the time domain output. To show the Bilevel Measurements panel, in the Time Scope menu, select Tools > Measurements > Bilevel Measurements. Collapse the Transitions section, click the arrow next to the section label. Expand the Settings and  Overshoots/Undershoots sections, click the arrow next to each label. The Time Scope appears as shown in the following figure.
%
% The value for the rising edge Settling Time parameter is not displayed initially because the default value for the Settle Seek parameter is too large for this example. Here, the settle seek time is longer than the entire simulation duration. Enter a value for Settle seek of 2e-6 and press the Enter key. The Time Scope now displays a rising edge settling time value of 118.392 ns.
% The settling time value displayed is the statistical average of the settling times for all five rising edges. To show the settling time for one rising edge, zoom in on that transition. In the Time Scope toolbar, click the Zoom X button.. Click the display near a value of 2 microseconds on the time-axis. Drag to the right and release near a value of 4 microseconds on the time-axis. The Time Scope updates the rising edge settling time value to reflect the new time window, as shown in the following figure.
%
% Copyright 2012 The MathWorks, Inc.