How to create a line passing through the inner boundary of the point set shown in the image?

2 次查看(过去 30 天)
Capture.JPG
I have several points with (X,Z) coordinates in a txt file. I have read all the point into column matrix X and Z. Then I plotted a 2D scatter plot. The blue dots are the points with Xand Z coordinates. I want to create a line (which is shown in red) passing through the inner boundary of points?
I tried the follwing code. the result shown below is not what I'm expecting. I'm really greatful for anyone who helps me solve the problem.
scatter(X,Z,1);
k= boundary (X,Z) ;
hold on;
plot (X(k), Z(k));
2.JPG

回答(0 个)

类别

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