For example i have a matrix1 0 1 1 01 1 0 0 10 1 0 1 11 1 0 0 10 1 0 0 1 and i want when i=j that time be zero briefly i want become0 0 1 1 01 0 0 0 10 1 0 1 11 1 0 0 10 1 0 0 0
how can i write code for it If my matrix name A
for loopmatrix
For example i have a matrix1 0 1 1 01 1 0 0 10 1 0 1 11 1 0 0 10 1 0 0 1 and i want when i=j that time be zero briefly i want become0 0 1 1 01 0 0 0 10 1 0 1 11 1 0 0 10 1 0 0 0
Best Answer