How can I automatically identify the start and end of a staircase function?
As in the following figure, I would like to automatically identify the beginning and the end (the whole part in red). It is important to note that there are several areas to identify on the same vector.
I have tried with the function "find" and "min" and "max" but it does not work perfectly when the data changes.
Should a function be able to identify a staircase function?
Best Answer