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 mid-reference level instants of the initial and final
transitions of each positive-polarity pulse in the bilevel waveform, X
.
To determine the transitions, pulsewidth
estimates
the low- and high-state levels of X
by a histogram
method. pulsewidth
identifies all regions that
cross the upper-state boundary of the low state and the lower-state
boundary of the high state. The low-state and high-state boundaries
are expressed as the state level plus or minus a multiple of the difference
between the state levels. See State-Level Tolerances. Because pulsewidth
uses
interpolation to determine the mid-reference 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 mid-reference 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 mid-reference 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 mid-reference level instants of the
initial transition of each pulse.
[
returns a column vector, W
,INITCROSS
,FINALCROSS
]
= pulsewidth(...)FINALCROSS
,
whose elements correspond to the mid-reference level instants of the
final transition of each pulse.
[
returns the waveform value, W
,INITCROSS
,FINALCROSS
,MIDLEV
]
= pulsewidth(...)MIDLEV
,
which corresponds to the mid-reference 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 |
|
Mid-reference level as percentage of the waveform amplitude. See Mid-Reference Level. Default: |
|
Pulse polarity. Specify the polarity as Default: |
|
Low- and high-state levels. |
|
Tolerance levels (lower and upper state boundaries) expressed as a percentage. See State-Level 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]. |
|
Mid-reference level instants of the initial transition |
|
Mid-reference level instants of the final transition |
|
Waveform value corresponding to the mid-reference level |
[1] IEEE® Standard on Transitions, Pulses, and Related Waveforms, IEEE Standard 181, 2003.