Extract turning, angles, or "unsteady" points in a Plot

5 views (last 30 days)
Hello Community,
I have a set of coordinates obtains from some sensor readings. The plot of the given data can give graphs such as those depicted on the image on the Graph below:
Can anyone please advise me on a method I could use to detect the "turning" points indicated in red. Please note that I do not have the actual function of the curve, just some set of (X, Y) coordinates. I was thinking of an algorithm that may for example for each point coordinates, would check the positions of surrounding points to find out whether or not the current point was one of those "special" point. Any help, or even some directions towards a possible solution would be greatly appreciated.
Thank You

Accepted Answer

Image Analyst
Image Analyst on 24 Dec 2012
Edited: Image Analyst on 24 Dec 2012
Yanick: We had this question come up recently in http://www.mathworks.com/matlabcentral/answers/57194. I used Roger's method (one of the naswers) to come up with this demo: http://www.mathworks.com/matlabcentral/answers/57194#comment_118587. It should work great in your case.
  2 Comments
Yanick
Yanick on 25 Dec 2012
Hi Image Analyst,
Thank you so much for the link you provided me with, it seems that it does attempt to solve the problem I am facing. There is a nice example provided which I have now downloaded and try to make sense of. Thanks again for your help, I have been looking around a while to achieve this now.
Yanick N.

Sign in to comment.

More Answers (1)

Joseph Areeda
Joseph Areeda on 24 Dec 2012
Hi Yanick,
I don't have a good handle on what you're trying to do. On an arbitrary scale, I think any real world data with noise would look like your graphs of 4 points.
From your description I assume you have fairly consistent data with occasional outliers and the problem is to identify the outliers.
My first SWAG at an algorithm would be to fit a curve to a short sliding segment of your data then measure the distance of points from the fitted curve. Flag the ones that are above some threshold. That depends on how well you can fit the data.
A similar approach for arbitrarily complex curves with noisy data is to simply smooth the curve (a low-pass FIR filter over the x and y values separately might be good enough) then flag the points that moved the most if they are above some threshold.
Picking outliers (if that is the task) often becomes a problem of defining what is normal variation.
Joe
  1 Comment
Yanick
Yanick on 25 Dec 2012
Hi Joseph, thank you for your input, I am not sure I can do exactly what you suggested, as I dont understand it fully. The link provided by "Image Analyst" below actually does describe a bit better what I am trying to do, which is not to pick outliers on my data, but to try to find point on the graph where there exist very sharp turns. I am not sure if the option you provided me will work, or even how I will apply it to my problem. Thanks for your input though, and if you believe it can help me solve the problem, please feel free to give me more explanations, and I will try to implement it.

Sign in to comment.

Categories

Find more on Data Preprocessing 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!