%% State Levels of 2.3 V Underdamped Noisy Clock
% Compute and plot the state levels of a 2.3 V underdamped noisy clock. Load the clock data in the variable, x, and the sampling instants in the variable t.
% Note: If you are using R2016a or an earlier release, replace each call to the object with the equivalent step syntax. For example, obj(x) becomes step(obj,x).

load('clockex.mat','x','t');

%
% Estimate the state levels.

sl = dsp.StateLevels;
levels = sl(x);

%
% Plot the clock data along with the estimated state levels and histograms.

plot(sl)

% Copyright 2012 The MathWorks, Inc.