I am using Matlab to implement my project. Please help me with the following.
In Matrix A (attached Image), elements of any particular row represent the nodes that are within the communication range of the node represented by the row number. For example node 2 and 12 are with in node 1's communication range, 3 and 13 are within 2's range, 4 is in node 12's range and so on. The tree(or network) in the attached image is drawn using matrix A.
I want matrix M for each node x where the first row of M contains the nodes that are within the range of node x(lets call this set of node S1), the second row of M should contain all those nodes that are within the range of any of the nodes in S1(lets call this set S2), the third row should contain all the nodes that are within the range of the nodes in S2 and so on. Right side of the attached image shows some examples of the required matrices. Both the input and output matrices are size nxn and contain 0's to represent null(For simplicity, I removed unnecessary rows and columns i.e those with all zero's).