%% Label Graph Edge Weight
% Create and plot a graph.

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

%
% Label the edge weights using labeledge.

weights = [5 10 15 10 10];
labeledge(h,1:numedges(G),weights)

% Copyright 2015 The MathWorks, Inc.