How to check if there is an edge between two nodes in an undirected graph?
Mostrar comentarios más antiguos
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!
Respuesta aceptada
Más respuestas (1)
Pratibha Chaudhary
el 9 de Nov. de 2022
0 votos
findedge(g, node1, node2).
Categorías
Más información sobre Undirected Graphs en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!