MATLAB: Find turning point in data

gradientplottriangle threshold

How to get data gradient and how to locate significant changes of the gradient? I'm trying to locate the first "turning point" of the plot below. Other turning points can be ignored.

Best Answer

Points like that are often found using a triangle thresholding method. I think there's one in the File Exchange. Basically it draws a line from the peak to the tail and then draws perpendicular lines from that hypotenuse line to the curve. The longest perpendicular line from the hypotenuse to the curve indicates the "corner" of the curve. Maybe that will work for you.