how can i change format of matrix I have a Matrix let we call it A Matrix, A[10*10] nodes and this matrix Aij=Aji as you see.
How can i can create from this matrix a matrix when a node connect another node randomly and it will be done for all nodes but for examle if x node connected y node y node will not connect x again
$$A=\begin{bmatrix}0&1&0&1&1&0&1&1&0&0 \\
1&0& 0& 1& 1& 0& 1& 1& 0& 0 \\
0& 0& 0& 1& 1& 1& 0& 1& 1& 1 \\
1& 1& 1& 0& 1& 1& 1& 1& 1& 1 \\
1& 1& 1& 1& 0& 1& 1& 1& 1& 1 \\
0& 0& 1& 1& 1& 0& 0& 1& 1& 1 \\
1& 1& 0& 1& 1& 0& 0& 1& 0& 0 \\
1& 1& 1& 1& 1& 1& 1& 0& 1& 1 \\
0& 0& 1& 1& 1& 1& 0& 1& 0& 1 \\
0& 0& 1& 1& 1& 1& 0& 1& 1& 0 \end{bmatrix}$$

In an adjacency matrix $A_{ij} = 1$ means "there is an edge from node $i$ to node $j$". Adjacency matrix of a directed graph (without cycles of length $2$) will have $A_{ij} = 0$ or $A_{ji} = 0$. A way to enforce it is
for i = 1:numOfNodes
    for j = i+1:numOfNodes
        if(randomBoolean) A[i][j] = 0
        else A[j][i] = 0

Note that iteration goes through all pairs $i, j$ such that $i < j$. This ensures that a pair will only be oriented once.
