Invalid MEX-file error when using betweenness_centrality.m script - not sure why!
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hey all,
I am trying to run the 'betweenness_centrality.m' script from the MatlabBGL package.
I am using a 64-bit macbook air and am using the matlab version 'Matlab2023a'.
However, when I try to run it, I get the following error:
Invalid MEX-file '/Users/macbook/Desktop/UCL PhD
Work/py_scripts/betweenness_centrality_mex.mexmaci64':
dlopen(/Users/macbook/Desktop/UCL PhD
Work/py_scripts/betweenness_centrality_mex.mexmaci64, 0x0006): Library not loaded:
'@loader_path/libmex.dylib'
Referenced from: '/Users/macbook/Desktop/UCL PhD
Work/py_scripts/betweenness_centrality_mex.mexmaci64'
Reason: tried: '/Users/macbook/Desktop/UCL PhD Work/py_scripts/libmex.dylib' (no
such file), '/usr/local/lib/libmex.dylib' (no such file),
'/usr/lib/libmex.dylib' (no such file)
Error in betweenness_centrality (line 110)
bc = betweenness_centrality_mex(A,weight_arg);
Error in Spacesocialproject (line 3)
bc = betweenness_centrality(G);
I have ensured that the 'betweenness_centrality_mex.mexmaci64' file is in the same directory as the matlab scripts.
I would be so grateful for a helping hand as to why this may be!
6 Commenti
Steven Lord
il 31 Mag 2023
Looks like they differ by a scaling factor.
format longg
P = [0.28888888888888886, 0.28888888888888886, 0.28888888888888886, 0.25742574257425743];
M = [0.0111, 0.0111, 0.0111, 0.0099];
scaleFactor = P./M
I'm betting if you actually used all the decimal places stored in the values in MATLAB each element of the scaling factor vector would be even closer to the same number.
I don't know what scaling factor or method Python uses. If you forced me to guess perhaps their definition doesn't divide by like the definition on the centrality documentation page does?
Risposte (0)
Vedere anche
Categorie
Scopri di più su Directed Graphs in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!