Determining area considering nodes arranged in space in an almost circular shape
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Alberto Acri
le 16 Jan 2024
Réponse apportée : Dyuman Joshi
le 16 Jan 2024
Hi. I have the attached nodes arranged in space. I would like to calculate the area having the nodes as boundaries.
I'm trying this way but it doesn't seem to work (the blue line does not follow the red nodes).
figure
x = plane_new(:,1);
y = plane_new(:,2);
k = boundary(x(:),y(:));
plot(x,y,'.-r')
line(x(k),y(k))
A = polyarea(x(k),y(k));
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1591931/image.png)
0 commentaires
Réponse acceptée
Dyuman Joshi
le 16 Jan 2024
load('plane_new.mat')
x = plane_new(:,1);
y = plane_new(:,2);
plot(x,y,'.-r')
A = polyarea(x,y)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!