%% Adjacency Matrix of Graph
% Create a directed graph using an edge list, and then find the equivalent adjacency matrix representation of the graph. The adjacency matrix is returned as a sparse matrix.

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

%

A = adjacency(G)

% Copyright 2015 The MathWorks, Inc.