matrix_df function

Convert matrix to data.frame