function xx = fullexpand2(x)
% xx = fullexpand2(x)
% for 2D vectors contained in rows of x, constructs vectorss with all
% the quadratic terms: x_1 x_2 x_1^2 x_2^2 x_1x_2
  [n,m] = size(x) ;
  xx1 = [repmat(x,1,2),x(:,1)];
  xx2 = [ones(n,2),x,x(:,2)];
  xx = xx1.*xx2;
  
  
