%% Fundamental Cycle Basis of Graph
% Create and plot an undirected graph.

s = [1 1 2 2 3 4 4 5 5 6 7 8];
t = [2 4 3 5 6 5 7 6 8 9 8 9];
G = graph(s,t);
plot(G)

%
% Calculate which nodes are in each fundamental cycle.

cycles = cyclebasis(G)

% Copyright 2020 The MathWorks, Inc.