Effacer les filtres
Effacer les filtres

How to rank nodes on a graph?

6 vues (au cours des 30 derniers jours)
BENEDETTO PIETRO Casu
BENEDETTO PIETRO Casu le 11 Nov 2021
Déplacé(e) : Steven Lord le 11 Oct 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

Réponses (2)

ag
ag le 11 Oct 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 le 11 Oct 2023
Déplacé(e) : Steven Lord le 11 Oct 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?

Catégories

En savoir plus sur Graph and Network Algorithms dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by