BOUNDARY is just a wrapper for ALPHASHAPE, i.e. it calls ALPHASHAPE inside. You can view the code to see how:
type boundary
or use the inbuilt debug tools to step though BOUNDARY when you call it with some sample values.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!