function X=build()
%   builds data set from user input
%   X = BUILD returns in X the n x 2 matrix where each row
%   is a data point.
%   Terminate input by hitting return.

figure;
axis([0 10 0 10]);

hold on;

i=1;
while 1
  title(['Enter point number ',num2str(i),' or press return to finalize'],'FontSize',16);
  x=ginput(1);
  if (length(x)==0)
      break
  end
  plot(x(1),x(2),'o');
  X(i,:) = x;
  i=i+1;
end

hold off;

