cosangle1 returns the cosine of the
angle between a vector vecs and the subspace spanned
by the columns of the matrix mat. For cosangle, vecs can be a matrix, in
which case cosangle1 is called for each column in vecs.cosangle(mat, vecs)
cosangle1(mat, vec)cosangle1 computes the cosine of the angle between vec and the orthogonal projection
of vec onto the column space of mat. cosangle repeats this computation
for each column of vecs.