function G = givensmat(x) % % Givens' matrix according to p. 195 % if abs(x(2)) >= abs(x(1)) t = x(1)/x(2); s = 1/sqrt(1+t^2); c = s*t; else t = x(2)/x(1); c = 1/sqrt(1+t^2); s = c*t; end; G = [c, s; -s, c];