%% State Levels with 100 Bins and Modes of Subhistograms
% Estimate the low- and high-state levels of 2.3 V underdamped clock data sampled at 4 MHz.
% Use the default number of bins and modes of the subhistograms to estimate the state levels.

load('clockex.mat','x','t')
levs = statelevels(x)

%
% Plot the clock data with the lines indicating the estimated low- and high-state levels.

statelevels(x)

% Copyright 2015 The MathWorks, Inc.