Azzera filtri
Azzera filtri

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

5 visualizzazioni (ultimi 30 giorni)
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]

Risposta accettata

KSSV
KSSV il 17 Ott 2022
Modificato: KSSV il 17 Ott 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 Commenti

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Voronoi Diagram in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by