Z=A(:,1)+i*A(:,2);
X=real(Z);
Y=imag(Z);
figure;

xmax=max(X)+0.1*max(X);
xmin=min(X)-0.1*min(X);
ymax=max(Y)+0.1*max(Y);
ymin=min(Y)-0.1*min(Y); %Size of Axis
axis([xmin xmax ymin ymax])
hold on;
n=length(Z);

plot(Z([1:n,1]));%erster Plot
% title([num2str(n),' Punkte'])



pointsleft=21;

Zneu=Z;
for i1=1:n-pointsleft
Winkelmaass=Winkel(Zneu);%Function: computes a relvance measure for every point"
[y,I]=sort(Winkelmaass);
Zneu(I(1))=[];
%in Zneu the points with the smallest relevance measure is removed
end

     axis([xmin xmax ymin ymax])
     hold on;
     plot(Zneu([1:n-i1,1]),'r');
     title(['Original Points: ', num2str(n),'   Evolved Points: ', num2str(pointsleft)])

hold off;
	
	

