update the matrix calculation file