function H=househ(x)
  //
  n = size(x,1); v=x;

  if x(1) > 0 then
    v(1) = -norm(x(2:n),2)**2/(x(1)+norm(x,2));
  else
    v(1) = x(1) - norm(x,2);
  end 
  H = eye(n,n) - 2/(v'*v)*v*v';
endfunction
