I want to calculate the area of a polygonal Voronoi figure

3 ビュー (過去 30 日間)
daivt soul
daivt soul 2018 年 5 月 21 日
回答済み: jahanzaib ahmad 2018 年 11 月 22 日
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
  1 件のコメント
Rena Berman
Rena Berman 2018 年 5 月 29 日
(Answers Dev) Restored edit

サインインしてコメントする。

回答 (2 件)

KSSV
KSSV 2018 年 5 月 21 日
You will be having vertices of each cell......use polyarea for the cell to get area.
  1 件のコメント
jahanzaib ahmad
jahanzaib ahmad 2018 年 11 月 22 日
but there is a problem with the vertices .. first x and y are "Inf " .

サインインしてコメントする。


jahanzaib ahmad
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)

カテゴリ

Help Center および File ExchangeVoronoi Diagram についてさらに検索

タグ

タグが未入力です。

Community Treasure Hunt

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

Start Hunting!

Translated by