Determine the coordinates of the nodes forming the outermost circle
Mostra commenti meno recenti
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 Commenti
Dyuman Joshi
il 17 Gen 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
il 17 Gen 2024
Risposta accettata
Più risposte (2)
Image Analyst
il 17 Gen 2024
1 voto
Can you get the coordinates as a list of (x,y) locations? If so, get the convex hull with convexHull or convhull
1 Commento
Dyuman Joshi
il 17 Gen 2024
+1 for convhull as I mentioned in my comment.
Alan Stevens
il 17 Gen 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)
Categorie
Scopri di più su Vector Fields in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!