%% Duty Cycle of Bilevel Waveform
% Determine the duty cycle of a bilevel waveform. Use the vector indices as the sample instants.

load('pulseex.mat','x')

d = dutycycle(x)

%
% Annotate the result on a plot of the waveform.

dutycycle(x);

% Copyright 2015 The MathWorks, Inc.