Watch this Author's files
To calculate mocularity,
g = graph(adjacency_matrix) m = modularity(g)
Contact us at files@mathworks.com