Finding the turning point on a curve

Hello;
I have a question about finding the turning points on a graph. See the curve that is attached. Its basically a second derivate of the data, and I can see the maximum values (points of interests) at x=10, x=37. How can I automatically find those two indices for these two maximum points.
The input data is also attached.

 Accepted Answer

v = [-0.000499915992890149
-0.00136716055731299
-0.00312202879147695
-0.00415143850349407
-0.00372399579905874
-0.00214247189597304
-4.88031918734373e-05
0.00186090040637454
0.00310143550393687
0.00352174551809843
0.00326203341992525
0.00261014952275744
0.00185224852020417
0.00118261260181092
0.000685142369381347
0.000361685775221777
0.000173644481175180
7.45001399801368e-05
2.65154258571087e-05
4.92923050407924e-06
-4.18585620462963e-06
-7.66464037567534e-06
-8.27292576250456e-06
-6.40533966605236e-06
-5.74990859836169e-07
1.30721733050333e-05
4.20520793933117e-05
9.94354287544991e-05
0.000205809520089438
0.000390149987664096
0.000687660786704286
0.00113216341113945
0.00174119870531302
0.00249441537474893
0.00331021806888304
0.00403084496564659
0.00442921778777076
0.00424844768230841
0.00327454998785455
0.00169124545504720
0.000814499263465100];
[pks,locs] = findpeaks(v)
pks = 2×1
0.0035 0.0044
locs = 2×1
10 37

More Answers (0)

Categories

Find more on Curve Fitting Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!