Algorithm to locate local maxima

后端 未结 9 1909
有刺的猬
有刺的猬 2020-12-24 03:24

I have data that always looks something like this:

alt text http://michaelfogleman.com/static/images/chart.png

I need an algorithm to locate the three peaks.

9条回答
  •  天涯浪人
    2020-12-24 03:47

    Couldn't you move along the graph, regularly calculating the derivative and if it switches from positive to negative you've found a peak?

提交回复
热议问题