I am looking for a way to extract the branches of a digraph in MATLAB. Precisely, if I have a network (my_digraph
) similar to the following:
When I enter my_digraph.plot
I recieve this:
I could now manually write down the branches by looking at the picture e.g. [1, 2]
, [1, 3]
, [1, 6, 7]
etc. However, in bigger networks this is not possible anymore. With which function can I extract this information from the picture so it gives me something like an array containing these vectors?
Note: I know that the pictures above are not digraphs, since they do not have a direction. However, they still show the principle.