Routine point2area.m calculates the broken linear line {xp,yp} that bounds the points with coordinates {x,y}.

Example:
x=rand(1,25);
y=rand(1,25);
[xp,yp]=point2area(x,y);
patch(xp,yp,'y');
hold on
plot(x,y,'.');
plot(xp,yp,'ro');

m_files