Determine the coordinates of the nodes forming the outermost circle
Show older comments
Hi! How can I extract only the coordinates of the nodes forming the outermost circle? The nodes are located on radius R = 4!
nodes = importdata("nodes.txt");
figure
plot3(nodes(:,1),nodes(:,2),nodes(:,3),'b.','Markersize',15);
axis equal
xlabel('x')
ylabel('y')
zlabel('z')

2 Comments
Dyuman Joshi
on 17 Jan 2024
If you need a general answer (considering the cases where the data points are not uniformaly spaced), using convhull would be the most fitting.
Alberto Acri
on 17 Jan 2024
Accepted Answer
More Answers (2)
Image Analyst
on 17 Jan 2024
1 vote
Can you get the coordinates as a list of (x,y) locations? If so, get the convex hull with convexHull or convhull
1 Comment
Dyuman Joshi
on 17 Jan 2024
+1 for convhull as I mentioned in my comment.
Alan Stevens
on 17 Jan 2024
Here's an alternative way:
nodes = importdata("nodes.mat");
figure
plot3(nodes(:,1),nodes(:,2),nodes(:,3),'b.','Markersize',15);
axis equal
xlabel('x')
ylabel('y')
zlabel('z')
r = 4;
theta = 0:2*pi/20:2*pi;
for i = 1:numel(theta)
x(i) = r*cos(theta(i));
y(i) = r*sin(theta(i));
z(i) = 3;
end
hold on
plot3(x,y,z,'ro','markersize',15)
view(0,90)
Categories
Find more on Vector Fields in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!