I have an array, for them I built a graph, now I need to get those values
which correspond to the "hills" and preferably an index. How do i do this better?
|
1 answer
In my opinion, nothing better than the decision "in the forehead" is not here.
The signal contains pulses greater than zero. They need to look.
Thus, to search for "hump":
- Set the threshold, the excess of which we assume that the value in the signal differs from zero (for example, 0.1).
- We set the threshold for permissible impulse nonuniformity (for example, 0.01).
- Set the minimum pulse duration (for example, 30s).
- We find the successive values of the signal that meet the conditions of paragraphs. 1-3 (for example, values fluctuate in the range of 0.948..0.950 over 30 s) - this is the beginning of the pulse.
- Find the value less than the threshold from p. 1 - this is the end of the pulse.
- Repeat paragraphs 4-5 to search for the next pulse.
- And can the code of the fire is - SVD102
- @ SVD102 The code is not ready to write - in my opinion, there is enough information in the above algorithm for its implementation. If something is unclear - I can explain. There was also a similar question: ru.stackoverflow.com/q/493973/201103 . There are code samples in the answers to this question. - Konstantin Les
|
f'[t]=(f[t]-f[t-1])/delta
), slides where it changes sign from "+" to "- when changing to zero, - ". But first, most likely, do some smoothing filtering. - i-one