mats2line function

Convert 2 matrices to lines