k = findnode(G,nodeID) returns
the numeric node ID, k, of the node in graph G whose
name is nodeID. The numeric node ID is zero if
the node is not in the graph.
Input graph, specified as either a graph or digraph object.
Use the graph function to create
an undirected graph or the digraph function
to create a directed graph.
Numeric node IDs, returned as a scalar or column vector. The
values of k are indices into G.Nodes.Name,
which is a cell array of character vectors containing the node names.