ep = {{-24.7697910000000,-15.8191235000000},{-20.6771670000000,-3.54125200000000};
{-12.6771670000000,20.4587480000000},{-20.6771670000000,-3.54125200000000};
{-11.9803417500000,-14.5401785500000},{13.0196582500000,-12.0401785500000};
{-11.9803417500000,-14.5401785500000},{-24.7697910000000,-15.8191235000000};
{4.32283300000000,-1.04125200000000},{-12.6771670000000,20.4587480000000};
{4.32283300000000,-1.04125200000000},{13.0196582500000,-12.0401785500000}};
n = size(ep, 1);
V = nchoosek(1:n, 2);
key = false(n, 1);
ep = cellfun(@(x) cell2mat(x), ep, 'UniformOutput', false);
is_same = @(x, y) norm(x - y, inf) / norm(x, inf) < 100*eps;
for i = 1:size(V, 1)
i1 = V(i,1);
i2 = V(i,2);
key(i) = is_same(ep{i1, 1}, ep{i2, 1}) || ...
is_same(ep{i1, 1}, ep{i2, 2}) || ...
is_same(ep{i1, 2}, ep{i2, 2}) || ...
is_same(ep{i1, 2}, ep{i2, 2});
end
matches = V(key, :);
Best Answer