What does this command return?
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:
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');