[v c]=voronoin(). Here i have to know about the output files of v and c.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sankarganesh P
am 17 Okt. 2022
Kommentiert: KSSV
am 17 Okt. 2022
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]
0 Kommentare
Akzeptierte Antwort
KSSV
am 17 Okt. 2022
Bearbeitet: KSSV
am 17 Okt. 2022
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Voronoi Diagram finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!