Introduction - If you have any usage issues, please Google them yourself
And other language using MATLAB algorithm to determine the connectivity graph, the adjacency matrix can be performed on the input connectivity and determine the number of connected components