title: How to get the vertices and edges of each polygon of the voronoi diagram using matlab?
body: <p>I have the following code to draw the voronoi diagram;</p>
  
  <pre><code> X = [ 0.018504 0.5187; 0.23114 0.70406;...
        0.4447 0.37589;0.45647  0.83682;...
        0.48598 0.59816; 0.60684 0.95388;...
        0.7621 0.44282; 0.82141 0.02221;...
        0.8913 0.84074; 0.95013  0.95278];
  
  [VX,VY] = voronoi(X(:,1),X(:,2));
  
   Assign_labels_to_all_points ( X ,X(:,1),X(:,2));
  
  plot(VX,VY,'-k','linewidth',2); 
  xlim([-0.2,1.2]);
  ylim([-0.2,1.2]);
  </code></pre>
  
  <p>It is shown in the Voronoi Diagram below:<br>
  <img src="https://i.stack.imgur.com/xtj1O.png" alt="Voronoi Diagram image"></p>
  
  <p>So, my question is: 
  <strong>How to get the vertices and edges of each polygon of the voronoi diagram?</strong></p>
  
  <blockquote>
    <p><strong>For example;</strong></p>
  </blockquote>
  
  <p><strong>Polygon X1 has 4 edges and 4 vertices points</strong>. I want to <strong>get the values of</strong> these vertices points. So, for each polygon of the 10 polygons; I want to get <strong>its</strong> <strong>vertices values</strong> and <strong>number of its edges</strong>.</p>