title: How to use splitapply/findgroups on clustered/non-sequential graphs?
body: <p>I need to implement splitapply function to non-sequential node index in graph.</p>
  
  <p>I implemented the splitapply function on a graph that has non-sequential clusters. The index numbers of the returned clusters were sequentially numbered but the graph vertices are not sequentially numbered.
  I want it to return the exact node indices from the original graph.</p>
  
  <pre><code>S={' 1',' 1',' 2',' 6',' 6',' 8'};
  T={' 2',' 3',' 3',' 8',' 9',' 9'};
  weight=[2; 2; 2; 2; 2; 2];
  G=graph(S,T,weight);
  
  plot(G)
  bins=conncomp(G);
  clusters = splitapply(@(x) {x}, 1:numnodes(G), bins);
  </code></pre>
  
  <p><strong>The actual results:</strong> <code>clusters: [1,2,3];[4,5,6]</code><br>
  <strong>The expected results:</strong> <code>clusters: [1,2,3];[6,8,9]</code></p>
  
  <p><a href="https://i.stack.imgur.com/iGUmo.png" rel="nofollow noreferrer">sample graph</a></p>