__givens__
- :
g =__givens__(x1, x2)¶ - :
[g, y] =__givens__(x1, x2)¶ Build the 2-by-2 Givens rotation that annihilates the second component of the scalar pair
[x1; x2].The result g is the orthogonal matrix
[c, s; -s, c], wherec = x1/r,s = x2/r, andr = hypot (x1, x2). Multiplying by it rotates the pair onto the first axis, so thatg * [x1; x2]equals[r; 0]. When both inputs are zero the rotation reduces to the identity matrix.Request a second output to obtain the rotated vector y, which is
[r; 0].