Returns the index vector to the points of the enclosing convex hull. The data points are defined by the x and y vectors.
A third optional argument, which must be a string, contains extra options passed to the underlying qhull command. See the documentation for the Qhull library for details.
The following code
x = -3:0.05:3; y = abs (sin (x)); k = convhull (x, y); plot (x(k),y(k),'r-',x,y,'b+'); axis ([-3.05, 3.05, -0.05, 1.05]);
Produces the following figure
![]() |