Documentation Center |
Duty cycle of pulse waveform
D = dutycycle(X)
D = dutycycle(X,FS)
D = dutycycle(X,T)
D = dutycycle(TAU,PRF)
[D,INITCROSS]
= dutycycle(X,...)
[D,INITCROSS,FINALCROSS]
= dutycycle(X,...)
[D,INITCROSS,FINALCROSS,NEXTCROSS]
= dutycycle(X,...)
[D,INITCROSS,FINALCROSS,NEXTCROSS,MIDLEV]
= dutycycle(X,...)
[D,INITCROSS,FINALCROSS,NEXTCROSS]
= dutycycle(X,...,Name,Value)
dutycycle(X,...)
D = dutycycle(X) returns the ratio of pulse width to pulse period for each positive-polarity pulse. D has length equal to the number of pulse periods in X. The sample instants of X correspond to the indices of X. To determine the transitions that define each pulse, dutycycle estimates the state levels of the input waveform by a histogram method. dutycycle 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.
D = dutycycle(X,FS) specifies the sampling frequency, FS, in hertz as a positive scalar. The first sample instant of X corresponds to t=0.
D = dutycycle(X,T) specifies the sample instants, T, as a vector with the same number of elements as X.
D = dutycycle(TAU,PRF) returns the ratio of pulse width to pulse period for a pulse width of TAU seconds and a pulse repetition frequency of PRF. The product of TAU and PRF must be less than or equal to 1.
[D,INITCROSS] = dutycycle(X,...) returns a vector, INITCROSS, whose elements correspond to the mid-crossings (mid-reference level instants) of the initial transition of each pulse with a corresponding NEXTCROSS.
[D,INITCROSS,FINALCROSS] = dutycycle(X,...) returns a vector, FINALCROSS, whose elements correspond to the mid-crossings (mid-reference level instants) of the final transition of each pulse with a corresponding NEXTCROSS.
[D,INITCROSS,FINALCROSS,NEXTCROSS] = dutycycle(X,...) returns a vector, NEXTCROSS, whose elements correspond to the mid-crossings (mid-reference level instants) of the next detected transition for each pulse.
[D,INITCROSS,FINALCROSS,NEXTCROSS,MIDLEV] = dutycycle(X,...) returns the mid-reference level, MIDLEV. Because in a bilevel pulse waveform the state levels are constant, MIDLEV is a scalar.
[D,INITCROSS,FINALCROSS,NEXTCROSS] = dutycycle(X,...,Name,Value) returns the ratio of pulse width to pulse period with additional options specified by one or more Name,Value pair arguments.
dutycycle(X,...) plots the waveform, X, and marks the location of the mid-reference level instants and the associated reference levels. The state levels and associated lower and upper state boundaries are also plotted.
X |
Bilevel waveform. X is a real-valued row or column vector. |
FS |
Sample rate in hertz. |
T |
Vector of sample instants. The length of T must equal the length of the bilevel waveform, X. |
TAU |
Pulse width in seconds. The product of TAU and PRF must be less than or equal to 1. |
PRF |
Pulse repetition frequency in pulses/second. The product of TAU and PRF must be less than or equal to 1. |
'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', dutycycle looks for pulses with positive-going (positive polarity) initial transitions. If you specify 'negative', dutycycle looks for pulses with negative-going (negative polarity) initial transitions. See Pulse Polarity for examples of positive and negative-polarity pulses. 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, dutycycle 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 |
D |
Duty cycle. Duty cycle is the ratio of the pulse width to the pulse period. Because the pulse width cannot exceed the pulse period, 0≤D ≤1. |
INITCROSS |
Mid-reference level instant of initial transition. Because the duty cycle is defined as the ratio of pulse width to pulse period, initial transitions are only reported when dutycycle finds a corresponding NEXTCROSS. |
FINALCROSS |
Mid-reference level instant of final transition. The duty cycle is defined as the ratio of pulse width to pulse period. Thus, final transitions are only reported when dutycycle finds a corresponding NEXTCROSS. |
NEXTCROSS |
Mid-reference level instant of the first initial transition after the final transition of the preceding pulse. |
MIDLEV |
Mid-reference level. The waveform value that corresponds to the mid-reference level. |
[1] Skolnik, M.I. Introduction to Radar Systems. New York, NY: McGraw-Hill, 1980.
[2] IEEE^{®} Standard on Transitions, Pulses, and Related Waveforms. IEEE Standard 181, 2003.