Mercurial > hg > octave-nkf
diff scripts/geometry/voronoi.m @ 11587:c792872f8942
all script files: untabify and strip trailing whitespace
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 20 Jan 2011 17:35:29 -0500 |
parents | fd0a3ac60b0e |
children | d0b799dafede |
line wrap: on
line diff
--- a/scripts/geometry/voronoi.m +++ b/scripts/geometry/voronoi.m @@ -71,7 +71,7 @@ error ("voronoi: expecting first argument to be an axes object"); endif else - if (nargout < 2) + if (nargout < 2) handl = gca (); endif endif @@ -82,9 +82,9 @@ x = varargin{narg++}; y = varargin{narg++}; - + opts = {}; - if (narg <= nargin) + if (narg <= nargin) if (iscell (varargin{narg})) opts = varargin(narg++); elseif (ismatrix (varargin{narg})) @@ -94,7 +94,7 @@ endif linespec = {"b"}; - if (narg <= nargin) + if (narg <= nargin) if (ischar (varargin{narg})) linespec = varargin(narg); endif @@ -130,7 +130,7 @@ ll = length (idx); c = c(idx).'; k = sum (cellfun ('length', c)); - edges = cell2mat(cellfun (@(x) [x ; [x(end), x(1:end-1)]], c, + edges = cell2mat(cellfun (@(x) [x ; [x(end), x(1:end-1)]], c, "uniformoutput", false)); ## Identify the unique edges of the Voronoi diagram @@ -150,7 +150,7 @@ vx = reshape (p (edges, 1), size(edges)); vy = reshape (p (edges, 2), size(edges)); - if (nargout < 2) + if (nargout < 2) lim = [xmin, xmax, ymin, ymax]; h = plot (handl, vx, vy, linespec{:}, x, y, '+'); axis (lim + 0.1 * [[-1, 1] * (lim (2) - lim (1)), ...