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 Kommentar

sakina Ashraf
sakina Ashraf am 13 Dez. 2020
Bearbeitet: Walter Roberson am 13 Dez. 2020
v=[1:n]
e=[2:n,1,n+2:2*n,n+1]
G=graph(v,e)
plot(G)

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Guillaume
Guillaume am 12 Nov. 2018

0 Stimmen

Your question is so vague that it's impossible to answer it properly.
The only thing we can do is point you to the graph documentation or possibly digraph if your graph is directed. There are plenty of examples there that show how to create, edit, display and work with graphs.

Weitere Antworten (0)

Kategorien

Mehr zu Graph and Network Algorithms finden Sie in Hilfe-Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by