Assign Numerical Node Labels
Show older comments
I am working with a digraph GG. I need to label the nodes in a different order than the order in which they appear in the adjacency matrix which was used to generate GG. I have these new integer-valued labels in a Nx1 vector called Name (N is the number of nodes). Why is it that I get an error when I use the following command?
>> GG.Nodes.Name = num2str(Name).
I also tried
>> labelnode(GG, 1:N, num2str(Name)),
again, to no avail.
Thank you very much for any advice you can offer.
1 Comment
Christine Tobler
on 2 Jul 2020
Can you tell us the error message you're getting?
Accepted Answer
More Answers (1)
Categories
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!