%% All Paths in Undirected Graph
% Create an adjacency matrix for a complete graph with four nodes, and then create an undirected graph from the adjacency matrix. Plot the graph.

A = ones(4);
G = graph(A);
plot(G)

%
% Calculate all paths in the graph that begin at node 1 and end at node 3.

paths = allpaths(G,1,3)

% Copyright 2020 The MathWorks, Inc.