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));

 Respuesta aceptada

Greg Heath
Greg Heath el 3 de Dic. de 2018

1 voto

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

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Centro de ayuda y File Exchange.

Productos

Versión

R2018b

Preguntada:

el 3 de Dic. de 2018

Respondida:

el 3 de Dic. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by