how do i create a signal which is reset to zero every time the input signal increases of 1?

5 views (last 30 days)
Hello everybody,
I need a Simulink model capable to take an input signal (for instance a discrete ramp) and to provide an output signal (true/false) that detects whenever the input signal increases of a value of 1, as shown in the attachment. For instance, the output signal could be a 0-1 signal or a staircase signal with step height =1.
thanks to all!

Answers (1)

Jan on 30 Jan 2023
signal2 = diff(signal) == 1;

Sign in to comment.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!