This example shows how to detect the rising edge of a signal using the Detect Rise Nonnegative and Detect Rise Positive blocks.
With a fixed-step size of 0.25, this example illustrates the difference between the Detect Rise Nonnegative and Detect Rise Positive blocks. The Detect Rise Nonnegative block outputs true (1
) at t=1
because the input signal increased from a negative value to a nonnegative value (0
). The Detect Rise Positive block outputs true (1
) at t=1.25
because the input signal increased from a nonpositive value (0
) to a strictly positive value.