I'm assigning values to nodes of a graph
tail = 1:9;head = 2:10;G = graph(tail,head);data = 1:10;G.Nodes.Value = data';p = plot(G)p.Marker = 's';p.MarkerSize = 7;p.NodeCData = G.Nodes.Value;colorbar
The above works fine.
Let's say there are no values for nodes 1 and 10 (head and tail). I'm not sure how to assign values in such a case. I could simply do rmnode(G,[1,10]), but this renumbers all the nodes. I actually plot the graph,G, and visualize the values at each node, so I don't want the nodes to be renumbered.
Any suggestions on how to proceed will be highly appreciated.
Best Answer