function [x,y] = removeidentical(x,y)

mm = ones(length(x),length(y),1)* NaN;

for n = 1 : length(x)-1
    for m = n+1 : length(x)
        mm(n,m) = sqrt((x(n)-x(m))^2 +(y(n)-y(m))^2);
    end
end

[n,m] = find (mm == 0);
if isempty(n) && isempty(m)
    return
end

x1=zeros(length(x)-length(n),1);
y1=zeros(length(x)-length(n),1);

ip1 = 0;
ip2 = 1;
for k = 1 : length(x)
    if k ~= m(ip2)
        ip1 = ip1 + 1;
        x1(ip1) = x(k);
        y1(ip1) = y(k);
    else
        if ip2 < length(n)
           ip2 = ip2 + 1;
        end
    end
end

x = x1;
y = y1;

end