Determining area considering nodes arranged in space in an almost circular shape

1 visualizzazione (ultimi 30 giorni)
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));

Risposta accettata

Dyuman Joshi
Dyuman Joshi il 16 Gen 2024
Directly use polyarea -
load('plane_new.mat')
x = plane_new(:,1);
y = plane_new(:,2);
plot(x,y,'.-r')
A = polyarea(x,y)
A = 42.3674

Più risposte (0)

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by