Mercurial > hg > octave-terminal
changeset 12824:819a60a05a65
codesprint: add test and demo for voronoi.m
author | Kai Habel <kai.habel@gmx.de> |
---|---|
date | Sat, 16 Jul 2011 22:37:10 +0200 |
parents | ab6fc7b40541 |
children | a1dcb854a4f9 |
files | scripts/geometry/voronoi.m |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/geometry/voronoi.m +++ b/scripts/geometry/voronoi.m @@ -166,3 +166,13 @@ endif endfunction + +%!testif HAVE_QHULL +%! phi=linspace(-pi,3/4*pi,8); +%! [x,y]=pol2cart(phi,1); +%! [vx,vy]=voronoi(x,y); +%! assert(vx(2,:),zeros(1,size(vx,2)),eps); +%! assert(vy(2,:),zeros(1,size(vy,2)),eps); + +%!demo +%! voronoi (rand(10,1), rand(10,1));