I\'m trying to write down the distance function which calculate the maximum distance between each rows of matrix, however, before calculate the maximum value, I need to remo