voronoi
- :
[vx, vy] =voronoi(x, y)¶ - :
[vx, vy] =voronoi(x, y, options)¶ - :
h =voronoi(…)¶ - : voronoi
(hax, …)¶ Compute the Voronoi diagram of the 2-D sites (x(i), y(i)).
With two outputs, vx and vy are 2-by-E matrices whose k-th columns hold the end points of the k-th Voronoi edge, so that
plot (vx, vy, "-", x, y, ".")draws the diagram. Edges between two Delaunay triangles join their circumcentres. Edges that extend to infinity are truncated: they start at a circumcentre and end at a point far outside the data.Without two outputs the diagram is plotted (into the axes hax if given) and the handle of the lines is returned.
options is passed to the Delaunay triangulation of the sites. At least three sites that are not all collinear are required; NaN or Inf coordinates are an error.