Extract turning, angles, or "unsteady" points in a Plot
조회 수: 3 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
Image Analyst
2012년 12월 24일
편집: Image Analyst
2012년 12월 24일
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
추가 답변 (1개)
Joseph Areeda
2012년 12월 24일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!