Create vertex with edges.
Show older comments
I am new in Matlab that's why I want to know, how to create a graph with edges and also how to access those edges. please help me.
1 Comment
sakina Ashraf
on 13 Dec 2020
Edited: Walter Roberson
on 13 Dec 2020
v=[1:n]
e=[2:n,1,n+2:2*n,n+1]
G=graph(v,e)
plot(G)
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!