How to check if there is an edge between two nodes in an undirected graph?
古いコメントを表示
How can I check if any two nodes in an undirected graph are connected via an edge or not, please? in other words, Are they neighbors or not? Thanks!
採用された回答
その他の回答 (1 件)
Pratibha Chaudhary
2022 年 11 月 9 日
0 投票
findedge(g, node1, node2).
カテゴリ
ヘルプ センター および File Exchange で Undirected Graphs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!