get a matrix from HMD or HFD or simialr data