slewrate
Slew rate of bilevel waveform
Syntax
S = slewrate(X)
S = slewrate(X,Fs)
S = slewrate(X,T)
[S,LT,UT]
= slewrate(...)
[S,LT,UT,LL,UL]
= slewrate(...)
S = slewrate(...,Name,Value)
slewrate(...)
Description
returns
the slew rate for all transitions found in the bilevel waveform, S
= slewrate(X
)X
.
The slew rate is the slope of the line connecting the 10% and 90%
reference levels. The sample instants of X
are
the indices of the vector. To determine the transitions, slewrate
estimates
the state levels of the input waveform by a histogram method. slewrate
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.
specifies
the sample rate, S
= slewrate(X
,Fs
)Fs
, in hertz. The first time
instant in X
corresponds to t=0.
specifies
the sample instants in the vector, S
= slewrate(X
,T
)T
. The length
of T
must equal the length of X
.
[
returns the time instants when the waveform
crosses the lowerpercent reference level, S
,LT
,UT
]
= slewrate(...)LT
,
and upperpercent reference level, UT
. If you
do not specify lower and upperpercent reference levels, the levels
default to 10% and 90%.
[
returns the waveform values that correspond
to the lowerreference levels, S
,LT
,UT
,LL
,UL
]
= slewrate(...)LL
, and upperreference
levels, UL
.
returns
the slew rate for all transitions with additional options specified
by one or more S
= slewrate(...,Name,Value
)Name,Value
pair arguments.
slewrate(...)
plots the bilevel waveform
and darkens the regions of each transition where the slew rate is
computed. The plot marks the lower and upperreference level crossings
and associated reference levels. The plot indicates the state levels
and associated lower and upper tolerances.
Input Arguments

Bilevel waveform as a realvalued column or row vector. If the
input waveform does not have at least one transition, 

Sample rate in hertz. 

Vector of sample instants. The length of 
NameValue Arguments

Percent reference levels. See Percent Reference Levels for a definition. Default: 

Low and highstate levels. 

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

Slew rates as realvalued scalars. A positive slew rate indicates that the upperpercent reference level occurs later than the lowerpercent reference level. A negative slew rate indicates that the upperpercent reference level occurs before the lowerpercent reference level. 

Time instants when signal crosses the lower percent reference
level. If you do not specify the lower percent reference levels with
the 

Time instants when signal crosses the upperpercent reference
level. If you do not specify the upperpercent reference levels with
the 

Waveform values at the lowerreference level. 

Waveform values at the upperreference level. 
Examples
More About
References
[1] IEEE^{®} Standard on Transitions, Pulses, and Related Waveforms, IEEE Standard 181, 2003.
See Also
falltime
 midcross
 pulsewidth
 risetime
 settlingtime
 statelevels