mat2pkl