How to obtain a graph?

3 次查看(过去 30 天)
Andrea Miceli
Andrea Miceli 2021-7-16
编辑: Matt J 2021-7-16
Hello to evreyone, I did a digraph on matlab and the result is what you see in the pic attached. What i am intereset in doing is to take just one node from this graph and see to which other nodes it connects to ( both in-degree and out-degree). As you can imagine, for a presentation the graph below is not really clear. I've already checked other function such as "subgraph", but I was not able to manage it. Can someone help me in doing this?
Thanks in advance

采纳的回答

Matt J
Matt J 2021-7-16
编辑:Matt J 2021-7-16
I've already checked other function such as "subgraph", but I was not able to manage it.
That should have worked,
neighb=[predecessors(G,nodeID); nodeID; successors(G,nodeID)];
Gsub=subgraph(G,neighb)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graph and Network Algorithms 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by