質問

I'm working on an implementation of the Tarjan algorithm in Matlab.
I use this source code to determine the strongly connected components.
This is the result I got, how can I view the result with Matlab (a figure that determines the colored strongly connected components)?
What is the appropriate command?

G=[0 0 1 1 0 0 0;
   1 0 0 0 0 0 0;
   0 0 0 0 0 1 0;
   0 0 0 0 1 0 0;
   0 0 0 0 0 0 1;
   0 0 0 1 0 0 0;
   0 0 0 0 0 1 0];

tarjan(G)

ans =

 7     5     4     6     0     0     0
 3     0     0     0     0     0     0
 1     0     0     0     0     0     0
 2     0     0     0     0     0     0
役に立ちましたか?

解決

There is already an examle using coloring, all nodes listed in the first row are colored with the first color, all nodes listed in the second row are colored with the second color etc...

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top