Like "Search 1D Array in reverse", but for the Threshold 1D Array function.
Also, there should be an option to find the first sample below a threshold.
When you want to find the start and the end of a peak, it's really messy to make code for it:
With these options,
1) Find threshold (set to high)
2) Find threshol (set to low), with start index the result of 1)
Without it you need:
1) Find the srart (only one function)
2) Reverse the array (this does not
3) Negate the array.
4) Negate the threshold
5) Find the threshold (starting from 0 or previous peak).
6) Find the real index (reletive from start)
7) Repeat 5 and 6 (we might have found a peak after the first peak, and we want the end of the first peak).
😎 Stop when the found index is past the start index (and then use the previous index), or when no index is found.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has not received any kudos within a year after posting will be automatically declined.