Calculating a Network's Diameter

5 ビュー (過去 30 日間)
Nikitas Provatakis
Nikitas Provatakis 2018 年 12 月 3 日
回答済み: Greg Heath 2018 年 12 月 3 日
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 日
mean(d(:))
Hope this helps
Thank you for formally accepting my answer
Greg

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by