Bilevel waveform pulse width
W = pulsewidth(X)
W = pulsewidth(X,FS)
W = pulsewidth(X,T)
[W,INITCROSS]
= pulsewidth(...)
[W,INITCROSS,FINALCROSS]
= pulsewidth(...)
[W,INITCROSS,FINALCROSS,MIDLEV]
= pulsewidth(...)
W = pulsewidth(...,Name,Value)
pulsewidth(...)
returns a vector, W
= pulsewidth(X
)W
, containing the time differences
between the midreference level instants of the initial and final
transitions of each positivepolarity pulse in the bilevel waveform, X
.
To determine the transitions, pulsewidth
estimates
the low and highstate levels of X
by a histogram
method. pulsewidth
identifies all regions that
cross the upperstate boundary of the low state and the lowerstate
boundary of the high state. The lowstate and highstate boundaries
are expressed as the state level plus or minus a multiple of the difference
between the state levels. See StateLevel Tolerances. Because pulsewidth
uses
interpolation to determine the midreference level instants, W
may
contain values that do not correspond to sampling instants of the
bilevel waveform, X
.
specifies
the sample rate, W
= pulsewidth(X
,FS
)FS
, in hertz as a positive scalar.
The first sample in the waveform corresponds to t=0.
Because pulsewidth
uses interpolation to determine
the midreference level instants, W
may contain
values that do not correspond to sampling instants of the bilevel
waveform, X
.
specifies
the sample instants, W
= pulsewidth(X
,T
)T
, as a vector with the
same number of elements as X
. Because pulsewidth
uses
interpolation to determine the midreference level instants, W
may
contain values that do not correspond to sampling instants of the
bilevel waveform, X
.
[
returns a column vector, W
,INITCROSS
]
= pulsewidth(...)INITCROSS
,
whose elements correspond to the midreference level instants of the
initial transition of each pulse.
[
returns a column vector, W
,INITCROSS
,FINALCROSS
]
= pulsewidth(...)FINALCROSS
,
whose elements correspond to the midreference level instants of the
final transition of each pulse.
[
returns the waveform value, W
,INITCROSS
,FINALCROSS
,MIDLEV
]
= pulsewidth(...)MIDLEV
,
which corresponds to the midreference level.
returns
the pulse widths with additional options specified by one or more W
= pulsewidth(...,Name,Value
)Name,Value
pair
arguments.
pulsewidth(...)
plots the signal and darkens
the regions of each pulse where pulse width is computed. It marks
the location of the mid crossings, and their associated reference
level. The state levels and their associated lower and upper boundaries
(adjustable by the Name,Value
pair with name 'Tolerance'
)
are also plotted.

Bilevel waveform. 

Sample rate in hertz. 

Vector of sample instants. The length of 

Midreference level as percentage of the waveform amplitude. See MidReference Level. Default: 

Pulse polarity. Specify the polarity as Default: 

Low and highstate levels. 

Tolerance levels (lower and upper state boundaries) expressed as a percentage. See StateLevel Tolerances. Default: 

Pulse widths in seconds. The pulse width is the time difference between the initial and final transitions of a pulse. The times of the initial and final transitions are referred to as transition occurrence instants in [1]. 

Midreference level instants of the initial transition 

Midreference level instants of the final transition 

Waveform value corresponding to the midreference level 
[1] IEEE^{®} Standard on Transitions, Pulses, and Related Waveforms, IEEE Standard 181, 2003.