I want to calculate the area of a polygonal Voronoi figure
2 次查看(过去 30 天)
显示 更早的评论
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
回答(2 个)
KSSV
2018-5-21
You will be having vertices of each cell......use polyarea for the cell to get area.
1 个评论
jahanzaib ahmad
2018-11-22
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Voronoi Diagram 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!