我看到问答里您说有“复杂网络聚类系数和平均路径长度计算的MATLAB源代码”,可以发给我一份么?

邮箱:15877487014@163.com
2024-12-22 22:19:19
推荐回答(2个)
回答1:

最短路径长,matlab自带的就有, graphshortestpath 和 graphallshortestpaths

>> help graphshortestpath
GRAPHSHORTESTPATH solves the shortest path problem in graph.

[DIST,PATH,PRED] = GRAPHSHORTESTPATH(G,S) determines the single source
shortest paths from node S to all other nodes in the graph G. Weights of
the edges are all nonzero entries in the n-by-n adjacency matrix
represented by the sparse matrix G. DIST are the n distances from source
to every node (using Inf for non-reachable nodes and zero for the source
node). The PATH contains the winning paths to every node, and PRED
contains the predecessor nodes of the winning paths.

至于聚类系数,我发给你好了。

回答2:

你好~~我也需要,能也发我一份么?1362574047@qq.com