I have a matrix
M= 1 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 0 0 0 1 0 1I want to replace all the diagonal elements in this matrix to 0 if it is 1.
adjacency matrix
M= 1 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 0 0 0 1 0 1I want to replace all the diagonal elements in this matrix to 0 if it is 1.
Best Answer