Diag matrix update