You also can specify a single source node and several target nodes. Find the number of edges between node 1 and all other nodes (including self-loops).
Input graph, specified as either a graph or digraph
object. Use graph to create an undirected graph or
digraph to create a directed graph.
Example: G = graph(1,2)
Example: G = digraph([1 2],[2 3])
Node pairs, specified as separate arguments of node indices or node names.
Similarly located elements in s and t
specify the source and target nodes for edges in the graph.
s and t must specify the same
number of nodes, unless one of them specifies a single node.
This table shows the different ways to refer to one or more nodes either by their numeric node indices or by their node names.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.