DMat conversion