I have MATLAB 9.1.0.441655 (R2016b) and want to use some of the functions in the Graph and Network Algorithm section on the MathWorks website ( https://uk.mathworks.com/help/matlab/graph-and-network-algorithms.html ) - specifically "measuring node importance" with
centrality.m
This function says that it was introduced in R2016a. However, in my version of matlab there are no such functions, and I can't find anywhere on the internet whether this is because it is a specific package/toolbox that you have to download/buy.
Can someone let me know how I get this?
Thanks, L

댓글 수: 1

Qiang
Qiang 2017년 4월 3일
Has anyone ever used this built-in function? I'm using Matlab 2016a and it has this function. I tried using it to calculate betweenness centrality and it was so surprisingly FASTER than the classic algorithms I could find online (seconds versus tens of hours).
Can someone please explain why the Matlab built-in Centrality is so fast?
Thanks in advance,
Qiang

댓글을 달려면 로그인하십시오.

 채택된 답변

Steven Lord
Steven Lord 2017년 1월 13일

0 개 추천

What does this command return?
which -all centrality
It should show two versions of that function, one the centrality method for graph objects and the other the method for digraph objects. Note that because this is a method, you will need to call it on an object of one of those two classes. For instance this would work:
rng default
A = sprand(100, 100, 0.1);
G = digraph(A);
C = centrality(G, 'betweenness');
This would not, even though A is the adjacency matrix of the digraph object G.
C2 = centrality(A, 'betweenness');

추가 답변 (0개)

카테고리

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

질문:

2017년 1월 13일

댓글:

2017년 4월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by