Statelevel estimation for bilevel waveform with histogram method
LEVELS = statelevels(X)
LEVELS = statelevels(X,NBINS)
LEVELS = statelevels(X,NBINS,METHOD)
[LEVELS,HISTOGRAM]
= statelevels(...)
[LEVELS,HISTOGRAM,BINLEVELS]
= statelevels(...)
statelevels(...)
estimates the low and highstate levels in the bilevel waveform, LEVELS
= statelevels(X
)X
,
using the histogram method. See Algorithms.
specifies
the number of bins to use in the histogram as a positive scalar. If
unspecified, LEVELS
= statelevels(X
,NBINS
)NBINS
defaults to 100.
estimates
state levels using the mean or mode of the subhistograms. Valid entries
for LEVELS
= statelevels(X
,NBINS
,METHOD
)METHOD
are 'mean'
or 'mode'
. METHOD
defaults
to 'mode'
. See Algorithms.
[
returns the histogram, LEVELS
,HISTOGRAM
]
= statelevels(...)HISTOGRAM
,
of the values in X
.
[
returns the centers of the histogram
bins.LEVELS
,HISTOGRAM
,BINLEVELS
]
= statelevels(...)
statelevels(...)
displays a plot of the
signal and the corresponding computed histogram.

Bilevel waveform. 

Number of histogram bins Default: 

Statelevel estimation method in the subhistograms. Default: 

Levels of low and high states. 

Histogram counts (frequencies). 

Histogram bin centers. 
statelevels
uses the histogram method to
estimate the states of a bilevel waveform. The histogram method is
described in [1]. To summarize
the method:
Determine the maximum and minimum amplitudes and amplitude range of the data.
For the specified number of histogram bins, determine the bin width as the ratio of the amplitude range to the number of bins.
Sort the data values into the histogram bins.
Identify the lowestindexed histogram bin, i_{low}, and highestindexed histogram bin, i_{high}, with nonzero counts.
Divide the histogram into two subhistograms.
The indices of the lower histogram bins are i_{low} ≤ i ≤ 1/2(i_{high} — i_{low}).
The indices of the upper histogram bins are i_{low} + 1/2(i_{high} – i_{low}) ≤ i ≤ i_{high}.
Compute the state levels by determining the mode or mean of the lower and upper histograms.
[1] IEEE^{®} Standard on Transitions, Pulses, and Related Waveforms, IEEE Standard 181, 2003, pp. 15–17.
midcross
 overshoot
 risetime
 undershoot