%% Determine Weight of Specified Edge
% Create a graph.

s = [1 1 2 3];
t = [2 3 3 4];
weights = [10 20 30 40];
G = graph(s,t,weights)

%
% Find the weight of the (1,3) edge, using findedge to retrieve the index.

G.Edges.Weight(findedge(G,1,3))

% Copyright 2015 The MathWorks, Inc.