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

sakina Ashraf
sakina Ashraf 2020년 12월 13일
편집: Walter Roberson 2020년 12월 13일
v=[1:n]
e=[2:n,1,n+2:2*n,n+1]
G=graph(v,e)
plot(G)

댓글을 달려면 로그인하십시오.

 채택된 답변

Guillaume
Guillaume 2018년 11월 12일

0 개 추천

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.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

태그

질문:

2018년 11월 12일

편집:

2020년 12월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by