Documentation |
Slew rate of bilevel waveform
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(...)
S = slewrate(X) returns the slew rate for all transitions found in the bilevel waveform, 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 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.
S = slewrate(X,Fs) specifies the sample rate, Fs, in hertz. The first time instant in X corresponds to t=0.
S = slewrate(X,T) specifies the sample instants in the vector, T. The length of T must equal the length of X.
[S,LT,UT] = slewrate(...) returns the time instants when the waveform crosses the lower-percent reference level, LT, and upper-percent reference level, UT. If you do not specify lower- and upper-percent reference levels, the levels default to 10% and 90%.
[S,LT,UT,LL,UL] = slewrate(...) returns the waveform values that correspond to the lower-reference levels, LL, and upper-reference levels, UL.
S = slewrate(...,Name,Value) returns the slew rate for all transitions with additional options specified by one or more 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 upper-reference level crossings and associated reference levels. The plot indicates the state levels and associated lower and upper tolerances.
X |
Bilevel waveform as a real-valued column or row vector. If the input waveform does not have at least one transition, slewrate returns an empty matrix. |
Fs |
Sampling rate in hertz. |
T |
Vector of sample instants. The length of T must equal the length of the bilevel waveform, X. |
'PercentReferenceLevels' |
Percent reference levels. See Percent Reference Levels for a definition. Default: [10,90] |
'StateLevels' |
Low- and high-state levels. StateLevels is a 1-by-2 real-valued vector. The first element is the low-state level. The second element is the high-state level. If you do not specify low- and high-state levels, slewrate estimates the state levels from the input waveform using the histogram method. |
'Tolerance' |
Tolerance levels (lower and upper state boundaries) expressed as a percentage. See State-Level Tolerances. Default: 2 |
[1] IEEE^{®} Standard on Transitions, Pulses, and Related Waveforms, IEEE Standard 181, 2003.