Added a function for finding the maximal (absolute) value of the matrix elements off the diagonal