
function [indtoremove] = calc_remove_ind(vertex, edge)
indtoremove = [];
E = edge(:,end-1:end);
V = [];
for i=2:length(vertex)
    V = [V; vertex{i}];
end
V = unique(V, 'rows');
for v = 1:size(V,1)
    d = sqrt(sum( (E - ones(size(E,1),1)*V(v,:)).^2,2));
    [val, pos] = min(d);
    if val < 10
        indtoremove(end+1) = pos;
    end
end
E = E(indtoremove,:);
return;
