Convert matrix carved into hex string