Fixed max value finder so it excludes the diagonal. Fixed so that the matrix A is updated symmetricaly for each iteration. Something is wrong, as the resulting matrix contains lots of nan.