wolffd@0: function ns = neighbors(adj_mat, i) wolffd@0: % NEIGHBORS Find the parents and children of a node in a graph. wolffd@0: % ns = neighbors(adj_mat, i) wolffd@0: wolffd@0: %ns = myunion(children(adj_mat, i), parents(adj_mat, i)); wolffd@0: ns = [find(adj_mat(i,:)) find(adj_mat(:,i))']; wolffd@0: