%% Reorder Graph Nodes
% Create and plot a graph.

s = [1 1 1 2 5 3 6 4 7 8 8 8];
t = [2 3 4 5 3 6 4 7 2 6 7 5];
G = graph(s,t);
plot(G)

%
% Reorder the graph nodes using a permutation vector.

order = [7 2 3 4 8 1 5 6];
G = reordernodes(G,order);
plot(G)

% Copyright 2015 The MathWorks, Inc.