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));
