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])
s,t — Node pairs (as separate arguments) node indices | node names
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.