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!