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

답변 (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 CenterFile Exchange에서 Voronoi Diagram에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by