MATLAB: Remove same element from vector

vector

I have this vector
E=[1,2;1,3;1,6;2,3;2,4;3,7;4,5;5,6;5,7;6,7;1,2;2,4;6,8];
I want to omit same element and also (6,8).
As 8 is not conneted to other points, I want to omit it too.
result is: E=[1,2;1,3;1,6;2,3;2,4;3,7;4,5;5,6;5,7;6,7];

Best Answer

a = sort(unique(E,'rows'),2);
b = unique(a(:));
c = hist(a(:),b);
out = a(all(ismember(a,b(c > 1)),2),:);