Azzera filtri
Azzera filtri

How to rank nodes on a graph?

6 visualizzazioni (ultimi 30 giorni)
BENEDETTO PIETRO Casu
BENEDETTO PIETRO Casu il 11 Nov 2021
Spostato: Steven Lord il 11 Ott 2023
Hello everybody! I am a newbie in Matlab and I have tried my way with the forum, guides, articles, etc., but I am not able to find what (I think) I need. So here is it: I have an undirected graph and I would like to select and use only some of its node, based on their rank. For instance, I have to run on it an algorithm to check its conductance, thus I need only the nodes with a selected centrality. Furthermore, my adiacency matrix changes every time I run the code, because it is the result of another code (I cannot name the nodes once and for all, unfortunately). I tried working with G.nodes syntax but I am not really great at it.
Can somebody help me? Thank you in advance!
Cheers,
Ben

Risposte (2)

ag
ag il 11 Ott 2023
Hi Benedetto,
I understand that you need to assign ranks to the nodes present in your graph, and then use only those nodes which qualify the required ranking conditions.
To do so, you can use the “Custom attributes” functionality to add the attribute “ranks” to each node.
Please refer to the following documentation for more details:
https://www.mathworks.com/help/matlab/math/add-graph-node-names-edge-weights-and-other-attributes.html#AddGraphNodeNamesEdgeWeightsAndOtherAttributesExample-4
Hope this helps!
Best Regards,
Aryan Gupta

Christine Tobler
Christine Tobler il 11 Ott 2023
Spostato: Steven Lord il 11 Ott 2023
It depends what you mean by the rank of a node.
There are various centrality measures available through the centrality function on a graph. It seems sometimes the rank of a node is also measured in terms of its position in a search done on that graph, is this what you are looking for?

Categorie

Scopri di più su Graph and Network Algorithms 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!

Translated by