is there a built in function to find inflection points of an array of data?

10 views (last 30 days)
I know how to do it if I go step-by-step, but I'm wondering if there's a built in function

Accepted Answer

John D'Errico
John D'Errico on 29 Jul 2019
Edited: John D'Errico on 29 Jul 2019
No. I'm not sure why there should be, as it is something that few people seem to have asked to do, and there are several ways to solve it. As well, noise is a huge issue here.
But it would be easy, even trivial to write. Unless of course, your data is noisy, as then the second derivatives you will be investigating will be far more noisy. Remember that differentiation is a noise amplification process, and it is numerical differentiation that you must do in one way or another.
As a start, I would simply recommend that you interpolate the data with a cubic spline. Then form the second derivative function, a piecewise linear function, and identify where that curve crosses zero. Again, if your data is noisy, then expect problems. You might then be better off using a smoothing spline or a least squares spline.
In the end, this is about 2 or 3 lines of code, IF you understand splines.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!