matrix2supp function

Convert a matrix to a likelihood function