I want to calculate the area of a polygonal Voronoi figure
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to calculate the area of a polygonal Voronoi figure.

How do I code the code?
https://jp.mathworks.com/help/matlab/math/voronoi-diagrams.html https://jp.mathworks.com/help/matlab/ref/polyarea.html
Réponses (2)
KSSV
le 21 Mai 2018
You will be having vertices of each cell......use polyarea for the cell to get area.
1 commentaire
jahanzaib ahmad
le 22 Nov 2018
but there is a problem with the vertices .. first x and y are "Inf " .
jahanzaib ahmad
le 22 Nov 2018
u can try this
there area r regions .
sumAREAA=0;
for k=1:length(r)
rk=r{k};
XP = rk(:,1:2:end);
YP = rk(:,2:2:end);
AREAA = polyarea(XP,YP);
sumAREAA=sumAREAA+AREAA;
disp(AREAA);
end
disp(sumAREAA)
0 commentaires
Voir également
Catégories
En savoir plus sur Voronoi Diagram 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!