fitting spline through local maxima

I just remembered that the pracma package has the findpeaks function for identifying local maxima. I wrote an answer using it a few months ago. And here's another example as well.

1 Like