I want to remove the elements from main and secondary diagonal in the matrix to get a new matrix, but my code doesn\'t work properly.It seems that there is something wrong w