scale_diagonals function

Adjust the diagonals of a matrix