How can we access individual edges in a Graph ?
Show older comments
Hello all, I have the following Graph:
I know that with G.Edges , we can know the edges.
But I am not getting, how can I access individual edge of this Graph.
Any help in this regard will be highly appreciated.
sr = [1,2,2,2,3,3,3,4,5];
ta = [2,3,6,8,6,4,7,6,6];
G = graph(sr,ta);
plot(G)
3 Comments
Dyuman Joshi
on 21 Apr 2023
What do you mean by "how can I access individual edge of this Graph."?
You can obtain any particular edge by using indexing from G.Edges.
Do you want to obtain a particular output? If so, then specify it.
charu shree
on 21 Apr 2023
Torsten
on 21 Apr 2023
G.Edges(8,:)
Accepted Answer
More Answers (0)
Categories
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!