필터 지우기
필터 지우기

[v c]=voronoin(). Here i have to know about the output files of v and c.

조회 수: 5 (최근 30일)
Sankarganesh P
Sankarganesh P 2022년 10월 17일
댓글: KSSV 2022년 10월 17일
clc
clear all
P = [0.5 0; 0 0.5; -0.5 -0.5; -0.2 -0.1; -0.1 0.1; 0.1 -0.1; 0.1 0.1] ;
[v c]=voronoin(P);
%Here i have to know about the output files of v and c.
%V-voronoi vertices and C-Voronoi cells
%output of c ( what these points are denotes)
%[9,2,1,8]
%[8,1,6,5,7]
%[6,1,2,4]
%[6,4,3,5]
%[10,3,5,7]
%[10,3,4,2,9]
%[10,7,8,9]

채택된 답변

KSSV
KSSV 2022년 10월 17일
편집: KSSV 2022년 10월 17일
v denotes the points/ coordinates of the voronoi edges and c gives you the nodal connectivity. The array c has the indices of the vertices v for which the elements are connected.
clear all
P = [0.5 0; 0 0.5; -0.5 -0.5; -0.2 -0.1; -0.1 0.1; 0.1 -0.1; 0.1 0.1] ;
[v, c]=voronoin(P);
voronoi(P(:,1),P(:,2))
hold on
plot(v(:,1),v(:,2),'+k')
figure
hold on
for i = 1:length(c)
x = v(c{i},1) ;
y = v(c{i},2) ;
patch(x,y,rand(1,3))
end
  댓글 수: 4
KSSV
KSSV 2022년 10월 17일
Thanks is accepting/ voting the answer. :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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