Update cmatrix