toFlatArray

Get a onedimensional array that stores all elements of the matrix.