MatrixToPhyDat function

Convert between matrices and phyDat objects