V
V
Vyacheslav Grachunov2019-03-22 23:16:14
Python
Vyacheslav Grachunov, 2019-03-22 23:16:14

How to find all ascending and descending intervals in a graph using Python?

There is a "graph" in the form of a series of x | y where x is the time and y are some values. How to find all ascending and descending segments using Python? How to find all continuous sections in which, with respect to a particular point, all points have a value less than / greater than a given point? Are there any ready-made solutions or at least libraries that make the task easier?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Griboks, 2019-03-23
@Griboks

1) we take the derivative
2) we look at its sign
3) well, then search + if
As you noticed, this is a fairly easy thing for the library. However, perhaps such things already exist in all sorts of mathematical modules.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question