Hi,
I have two cell arrays, each cell in these two arrays represent a connected component in a graph.
C = {[21,45,87,99,121],[37,918],[150,700],[218,851],[420,728],[464,761],[695,709],16,34}; % Connected components in Graph G
B = {[4,600,303,5,56,88,87,63],[142,257,481,785],[103,33,509],[99,588],[251,524],[572,683],8,65,105} % Connected components in Graph H
I want to go through each cell in array C and check if it's members (Nodes) connected to other cell's members (nodes) in B.
That is, if the nodes [37,918] in C (in the same component) are connected to the two nodes 251 and 588 in B (different component) remove the edge between 37,918.
I would appreciate your help and tips.
Best Answer