Documentation |
Period of bilevel pulse
P = pulseperiod(X)
P = pulseperiod(X,FS)
P = pulseperiod(X,T)
[P,INITCROSS]
= pulseperiod(...)
[P,INITCROSS,FINALCROSS]
= pulseperiod(...)
[P,INITCROSS,FINALCROSS,NEXTCROSS]
= pulseperiod(...)
[P,INITCROSS,FINALCROSS,NEXTCROSS,MIDLEV]
= pulseperiod(...)
[P,INITCROSS,FINALCROSS,NEXTCROSS,MIDLEV]
= pulseperiod(...,Name,Value)
pulseperiod(...)
P = pulseperiod(X) returns a vector, P, containing the difference between the mid-reference level instants of the initial transition of each positive-polarity pulse and the next positive-going transition in the bilevel waveform,X. If pulseperiod does not find two positive-polarity transitions, P is empty. To determine the transitions for each pulse, pulseperiod estimates the state levels of the input waveform by a histogram method and identifies all regions 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. Because pulseperiod uses interpolation to determine the mid-reference level instants, P may contain values that do not correspond to sampling instants of the bilevel waveform, X.
P = pulseperiod(X,FS) specifies the sampling rate in hertz as a positive scalar. The first sample instant in X corresponds to t=0. Because pulseperiod uses interpolation to determine the mid-reference level instants, P may contain values that do not correspond to sampling instants of the bilevel waveform, X.
P = pulseperiod(X,T) specifies the sampling instants in a vector equal in length to X. Because pulseperiod uses interpolation to determine the mid-reference level instants, P may contain values that do not correspond to sampling instants of the bilevel waveform, X.
[P,INITCROSS] = pulseperiod(...) returns the mid-reference level instants of the first transition of each pulse.
[P,INITCROSS,FINALCROSS] = pulseperiod(...) returns the mid-reference level instants of the final transition of each pulse.
[P,INITCROSS,FINALCROSS,NEXTCROSS] = pulseperiod(...) returns the mid-reference level instants of next detected transition after each pulse.
[P,INITCROSS,FINALCROSS,NEXTCROSS,MIDLEV] = pulseperiod(...) returns the mid-reference level,MIDLEV.
[P,INITCROSS,FINALCROSS,NEXTCROSS,MIDLEV] = pulseperiod(...,Name,Value) returns the pulse periods with additional options specified by one or more Name,Value pair arguments.
pulseperiod(...) plots the signal and darkens every other identified pulse. 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.
X |
Bilevel waveform. If the waveform, X, does not contain at least two transitions, pulseperiod outputs an empty matrix. |
FS |
Sample rate in hertz. |
T |
Vector of sample instants. The length of T must equal the length of the bilevel waveform, X. |
'MidPercentReferenceLevel' |
Mid-reference level as a percentage of the waveform amplitude. Default: 50 |
'Polarity' |
Pulse polarity. Specify the polarity as 'positive' or 'negative'. If you specify 'positive', pulseperiod looks for pulses whose initial transition is positive-going (positive polarity). If you specify 'negative', pulseperiod looks for pulses whose initial transition is negative-going (negative polarity). Default: 'positive' |
'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, pulseperiod 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.