2D curves from scatter points

5 次查看(过去 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 个)

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.

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by