Hi everyone,
I have a graph, G on which I have a applied the distances function such that
d=distances(G);
to get the matrix of shortest path distances between every node pair.
I would like someone to verify that the network diameter can be calculated as
max(d);
and the mean path length of the network as
mean(mean(d));

 Akzeptierte Antwort

Greg Heath
Greg Heath am 3 Dez. 2018

1 Stimme

mean(d(:))
Hope this helps
Thank you for formally accepting my answer
Greg

Weitere Antworten (0)

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by