23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2convhulln<br />

Purpose n-D convex hull<br />

Syntax K = convhulln(X)<br />

[K,v] = convhulln(X)<br />

convhulln<br />

Description K = convhulln(X) returns the indices K of the points in X that comprise the<br />

facets of the convex hull of X. X is an m-by-n array representing m points in n-D<br />

space. If the convex hull has p facets then K is p-by-n.<br />

[K,v] = convhulln(X) also returns the volume v of the convex hull.<br />

Note convhulln is based on qhull [2]. For information about qhull, see<br />

http://www.geom.umn.edu/software/qhull/. For copyright information, see<br />

http://www.geom.umn.edu/software/download/COPYING.html.<br />

Visualization Plotting the output of convhulln depends on the value of n:<br />

• For n = 2, use plot as you would for convhull.<br />

• For n = 3, you can use trisurf to plot the output. The calling sequence is<br />

K = convhull(X);<br />

trisurf(K,(X(:,1),X(:,2),X(:,3))<br />

For more control over the color of the facets, use patch to plot the output. For<br />

an example, see “Tessellation and Interpolation of Scattered Data in Higher<br />

Dimensions” in the <strong>MATLAB</strong> documentation.<br />

• You cannot plot convhulln output for n > 3.<br />

See Also convhull, delaunayn, dsearchn, tsearchn, voronoin<br />

<strong>Reference</strong> [1] Barber, C. B., D.P. Dobkin, and H.T. Huhdanpaa, "The Quickhull Algorithm for<br />

Convex Hulls," ACM Transactions on Mathematical Software, Vol. 22, No. 4,<br />

Dec. 1996, p. 469-483. Available in HTML format at http://www.acm.org/<br />

pubs/citations/journals/toms/1996-22-4/p469-barber/ and in PostScript<br />

format at ftp://geom.umn.edu/pub/software/qhull-96.ps.<br />

2-333

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!