%% Determine Index of Named Node
% Create a graph, and then determine the numeric node index for the nodes named 'AB' and 'BC'.

s = {'AA' 'AA' 'AA' 'AB' 'AC' 'BB'};
t = {'BA' 'BB' 'BC' 'BA' 'AB' 'BC'};
G = graph(s,t)

%

k = findnode(G,{'AB' 'BC'})

% k contains the row index into G.Nodes.Name for each specified node.
% Copyright 2015 The MathWorks, Inc.