%% Find Graph Components
% Create and plot an undirected graph with three connected components. Use conncomp to determine which component each node belongs to.

G = graph([1 1 4],[2 3 5],[1 1 1],6);
plot(G)

%

bins = conncomp(G)

% Copyright 2015 The MathWorks, Inc.