필터 지우기
필터 지우기

2D curves from scatter points

조회 수: 1 (최근 30일)
ARF
ARF 2016년 12월 2일
답변: Don Zheng 2016년 12월 8일
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
Image Analyst
Image Analyst 2016년 12월 2일
You forgot to post a screenshot. Please read this link

댓글을 달려면 로그인하십시오.

답변 (1개)

Don Zheng
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.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by