Algorithm to locate local maxima

后端 未结 9 1882
有刺的猬
有刺的猬 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:32

    You could try to fit a spline to the data and then find the extrema of the spline. Since the spline is piecewise polynomial, the exact locations of the extrema can be found with relatively simple formulas.

提交回复
热议问题