MATLAB Function Reference Previous page   Next Page

N-dimensional convex hull



K = convhulln(X) returns the indices K of the points in X that comprise the facets of the convex hull of X. X is an m-by-n array representing m points in N-dimensional space. If the convex hull has p facets then K is p-by-n.

convhulln uses Qhull.

K = convulln(X, options) specifies a cell array of strings options to be used as options in Qhull. The default options are:

If options is [], the default options are used. If options is {''}, no options are used, not even the default. For more information on Qhull and its options, see

[K, v] = convhulln(...) also returns the volume v of the convex hull.


Plotting the output of convhulln depends on the value of n:


The following example illustrates the options input for convhulln. The following commands

return a warning.

To suppress the warning, use the option 'Pp'.The following command passes the option 'Pp', along with the default 'Qt', to convhulln.


convhulln is based on Qhull [2]. For information about Qhull, see For copyright information, see

See Also

convhull, delaunayn, dsearchn, tsearchn, voronoin


[1]  Barber, C. B., D.P. Dobkin, and H.T. Huhdanpaa, "The Quickhull Algorithm for Convex Hulls," ACM Transactions on Mathematical Software, Vol. 22, No. 4, Dec. 1996, p. 469-483. Available in PDF format at citations/journals/toms/1996-22-4/p469-barber/.

[2]  National Science and Technology Research Center for Computation and Visualization of Geometric Structures (The Geometry Center), University of Minnesota. 1993.

Previous page  convhull convn Next page

© 1994-2005 The MathWorks, Inc.