update matrix2raw