Cyclebasis function for graphs not working
Ältere Kommentare anzeigen
I have the following graph, with the corresponding cycle generation using cycle basis:
Matlab generates makes a mistake with the third cycle giving:
2 9 5 13 11 12 when it should be 2 9 5 13 12.
s = [ 1 4 6 3 10 2 9 5 8 7 1 11 12 3 12 13 4 11 13];
t = [ 4 6 3 10 2 9 5 8 7 1 11 12 2 12 13 8 11 13 5];
G = graph(s,t);
plot(G)
[cycles,edgecycles] = cyclebasis(G);
cycles
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Graph and Network Algorithms finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


