www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/RemoveEdgesWithSpecifiedEdgeIndicesExample.m
%% Remove Edge with Specified Index % Create a graph and view the edge list. % Copyright 2015 The MathWorks, Inc. s = {'BOS' 'NYC' 'NYC' 'NYC' 'LAX'}; t = {'NYC' 'LAX' 'DEN' 'LAS' 'DCA'}; G = digraph(s,t); G.Edges %% % Remove the edge between nodes |'NYC'| and |'DEN'| using the edge index. G = rmedge(G,3); G.Edges