Mid-reference level crossing for bilevel waveform
C = midcross(X)
C = midcross(X,FS)
C = midcross(X,T)
[C,MIDLEV]
= midcross(...)
C = midcross(X,Name,Value)
midcross(...)
returns
a vector, C
= midcross(X
)C
, of time instants where each transition
of the input signal, X
, crosses the 50% reference
level. The sample instants correspond to the indices of the input
vector. Because midcross
uses interpolation to
determine the crossing instant, C
may contain
values that do not correspond to sampling instants. To determine the
transitions, midcross
estimates the state levels
of X
by a histogram method. midcross
identifies
all intervals which 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.
specifies
the sample rate, C
= midcross(X
,FS
)FS
, in hertz as a positive scalar.
The first sample instant corresponds to t=0.
Because midcross
uses interpolation to determine
the crossing instant, C
may contain values that
do not correspond to sampling instants.
specifies the sample instants, C
= midcross(X
,T
)T
, as a vector
with the same number of elements as X
. Because midcross
uses
interpolation to determine the crossing instant, C
may
contain values that do not correspond to sampling instants.
[
returns the waveform value corresponding
to the mid-reference level. C
,MIDLEV
]
= midcross(...)
returns
the time instants corresponding to mid-reference level crossings with
additional options specified by one or more C
= midcross(X
,Name,Value
)Name,Value
pair
arguments.
midcross(...)
plots the signal and marks
the location of the mid-crossings (mid-reference level instants) and
the associated reference levels. midcross
also
plots the state levels with upper and lower state boundaries.
|
Bilevel waveform. |
|
Sample rate in hertz. |
|
Vector of sample instants. The length of |
Specify optional
comma-separated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
|
Mid-reference level as a percentage of the waveform amplitude. Default: |
|
Low and high state levels. |
|
Tolerance levels (lower- and upper-state boundaries) expressed as a percentage. See State-Level Tolerances. Default: |
|
Time instants of the mid-reference level crossings. |
|
Mid-reference level. |
[1] IEEE® Standard on Transitions, Pulses, and Related Waveforms, IEEE Standard 181, 2003. p. 20.
falltime
| pulsewidth
| risetime
| settlingtime
| statelevels