2D curves from scatter points
조회 수: 5 (최근 30일)
이전 댓글 표시
I have 2D points stored in a matrix. These points represents curves on a cartesian plane. If I plot these points as
plot(data(:,1),data(:,2),'.')
I can clearly see these curves, except for some spurious points.
Is there a way to save each curve in a separate variable? Note that the points in the matrix 'data' are stored randomly, i.e. following points belongs to different curves.
Thank you very much.
답변 (1개)
Don Zheng
2016년 12월 8일
Hi ARF,
My understanding of your question is that you want to separate the points in 'data' by their topological distribution (i.e., lying on the same curve). This process seems to fall into the concept of clustering. The Machine Learning toolbox is a powerful tool for clustering. A self-organizing map might be what you are looking for.
Also, based on the prio-knowledge about the curves, you may also use the following tool to perform fitting: https://www.mathworks.com/matlabcentral/fileexchange/40613-multiple-curve-fitting-with-common-parameters-using-nlinfit
Another approach that I can think of is a graphic approach. For example, imagine these points are pixel positions and assume the curves are straight lines. With that assumption, you can use HOUGH transform to find the lines as well as points following onto them.
Last but not least, you can try a manual approach. After plotting the points, in the figure window, click the Brush/Select Data icon, manually select the points that you think should fall into one group. Then, go to Tools > Brushing > Create new variable... and create a variable for those points. Do the same for each group (or curve) of data.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Scatter Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!