j = boundary(x,y,0.1); %这个函数是求一堆(平面)点的边界,它不是凸包,这里的边界可以凹陷,第三个参数0.1代表以松散的形式画出边界,1是以最紧凑的形式画出边界。
下面这个是官网的例子:(http://www.mathworks.com/help/matlab/ref/boundary.html)
Create and plot a set of random 2-D points.
x = gallery('uniformdata',30,1,1);
y = gallery('uniformdata',30,1,10);
plot(x,y,'.')
xlim([-0.2 1.2])
ylim([-0.2 1.2])
k = boundary(x,y);
hold on;
plot(x(k),y(k));
j = boundary(x,y,0.1);
hold on;
plot(x(j),y(j));