Qu

pulse_width

Builtin index · Signal processing

result = pulse_width(x, [level=], [hysteresis=0], [polarity="positive"])

Input: x, level, hysteresis, polarity · Output: result

What it is

x: a length-N real vector or Signal; keywords as for find_pulses.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = pulse_width(x, [level=], [hysteresis=0], [polarity="positive"])
x vector or Signalx: a length-N real vector or Signal.
level optionalnot documented yet
hysteresis optional (default 0)not documented yet
polarity optional (default "positive")not documented yet
result number or Signal
Returns a single number: the mean width of the complete pulses, in seconds for a Signal and samples otherwise. Equal by construction to mean(find_pulses(x, ...).widths).

Examples

No documentation example calls this form yet. The Signal processing chapter is where one belongs.

How it works

pulse_width(x, [level=], [hysteresis=], [polarity="positive"]) -- the MEAN width of the complete pulses in x, in seconds for a Signal and samples otherwise. Equal by construction to mean(find_pulses(x, ...).widths), because it is the same computation.

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.