points2line function

Convert a series of points, or a matrix of coordinates, into a line