clf
axis([-4 4 -4 4])
hold on
x=[];y=[];n=0;but=1;
while but==1,
[xi,yi,but]=ginput(1);
plot(xi,yi,'ro')
n=n+1;
y(n,1)=yi;x(n,1)=xi; 
end
hold off