How to find distance between two nodes? including the nodes.

For example: In this graph i would like to find distance *between s1 and s3.
SO MY OUTPUT SHOULD LOOK LIKE : Distance = 7 (includes both edges and nodes)

2 Comments

Can you share the code with which the image was generated?

Sign in to comment.

Commented:

on 17 Nov 2020

Community Treasure Hunt

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

Start Hunting!