Latest surface Loop segments source. contains detailed notes, is good stuff getting started with surface subdivision. The complete source code, has been tested and can be used directly.
File list:
loopSubdivision
..............\loopSubdivision.m
..............\loopSubdivision.png

..............\plotMesh.m
..............\Readme.txt
..............\test_loop.m