dgleich / matlab-bgl

A graph library for Matlab based on the boost graph library
http://dgleich.github.com/matlab-bgl
107 stars 70 forks source link

Matlab error in Computing Edge-Betweenness Centrality #20

Open reyhanehnazemian opened 8 years ago

reyhanehnazemian commented 8 years ago

Hello I'm trying to calculate the betweenness centrality for all edges in an adjacency matrix. I download matlabbgl from https://www.cs.purdue.edu/homes/dgleich/packages/matlab_bgl/ that includes betweenness_centrality.m file and unzip it to a directory. Then I open matlab and change directory until I get to the directory where I unzipped matlabbgl.

Well I'm not 100% sure, but I think that this can be my solution. However, I'm still new to matlab and can't get the code running very well. when I call betweenness centrality with a sparse matrix argument in another file and run it, the matlab gives error :

Undefined function 'betweenness_centrality_mex' for input arguments of type 'double'. Error in betweenness_centrality (line 110) bc = betweenness_centrality_mex(A,weight_arg);

OS is Windows 7 enterprise 64-bit and Matlab 2013a Any help is highly appreciated. I'm currently writing my thesis and desperately need betweenness for my network :) Thanks a lot!!!

dgleich commented 8 years ago

That means it can't find the mex files.

Try the files here.

https://www.cs.purdue.edu/homes/dgleich/packages/matlab_bgl/old/matlab_bgl-4.0.1.zip

(This may take a few mins to become available...)

reyhanehnazemian commented 8 years ago

Hi Sir Thanks a lot for your guidance and response. Fortunately my problem solved :) with best regards

On Sun, Jun 12, 2016 at 9:56 PM, David Gleich notifications@github.com wrote:

That means it can't find the mex files.

Try the files here.

https://www.cs.purdue.edu/homes/dgleich/packages/matlab_bgl/old/matlab_bgl-4.0.1.zip

(This may take a few mins to become available...)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dgleich/matlab-bgl/issues/20#issuecomment-225449456, or mute the thread https://github.com/notifications/unsubscribe/AS9-Q1Jw6XO_KtWZoFV9sk5cnXGJvkoXks5qLEFZgaJpZM4IzyXM .

reyhanehnazemian commented 8 years ago

Hi Sir Thanks a lot for your guidance and response. Fortunately my problem solved :) with best regards

chantalnguyen commented 6 years ago

Hi David, I had the same problem, and I tried using the files at the link you posted but it doesn't work for me. I'm running Mac OS 10.12.6 (Sierra) and Matlab 2017b. I get the same error message - Undefined function or variable 'betweenness_centrality_mex'. Your help would be much appreciated!

dgleich commented 6 years ago

I'm gonna try and track down the most recent version of Matlab to check this one out.

If you could compile another mex file and let me know what filename it compiles to, that'd be super helpful!