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

 채택된 답변

Greg Heath
Greg Heath 2018년 12월 3일

1 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2018년 12월 3일

답변:

2018년 12월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by