matrixdiagcopy function

Copy the upper matrix triangle to the lower one