%% Find Outgoing Edges and Node Successors
% Plot a graph and highlight the outgoing edges and successors of a selected node.
%
% Create and plot a directed graph using the bucky adjacency matrix. Highlight node 10 for reference.

G = digraph(bucky);
p = plot(G);
highlight(p,10,'NodeColor','r','MarkerSize',10)

%
% Determine the outgoing edges and successors of node 10. Highlight these nodes and edges.

[eid,nid] = outedges(G,10)

%

X = G.Edges(eid,:)

%

highlight(p,nid,'NodeColor','g','MarkerSize',9)
highlight(p,'Edges',eid,'EdgeColor','g')

% Copyright 2012 The MathWorks, Inc.