www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ReverseAllEdgesInGraphExample.m

    %% Reverse All Edges in Graph
% Create and plot a directed graph. Then reverse the direction of all of
% the edges in the graph.
G = digraph([1 1 1 1],[2 3 4 5]);
plot(G)

%%
H = flipedge(G);
plot(H)