I want to calculate the area of a polygonal Voronoi figure
3 ビュー (過去 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 日
but there is a problem with the vertices .. first x and y are "Inf " .
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!