Stopped mass covert to NumericVector in the matrix function