www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/VoronoiDiagramBasedOnVerticesOfVeronoiEdgesExample.m
%% Voronoi Diagram Based on Vertices of Voronoi Edges % This code uses the vertices of the finite Voronoi edges to plot % the Voronoi diagram for the same 10 points used in the previous example. % Copyright 2015 The MathWorks, Inc. x = gallery('uniformdata',[1 10],0); y = gallery('uniformdata',[1 10],1); [vx,vy] = voronoi(x,y); plot(x,y,'r+',vx,vy,'b-') axis equal %% % Note that you can add the following code to get the figure shown in % the previous example. xlim([min(x) max(x)]) ylim([min(y) max(y)])