function [ c, S]= rotate(xl, x2) ifX2==0 0 if abs(x2)>=abs(x1) cotangent =x1/x2 s=1/sqrt(+cotangent2): C=S*cotangent else tangent=x2/x1 C=1/sqrt(1+tangent/2) c"tanger end d end
function [c,s] = Rotate(x1,x2) if x2==0 c = 1; s = 0; else if abs(x2)>=abs(x1) cotangent = x1/x2; s = 1/sqrt(1+cotangent^2); c = s*cotangent; else tangent = x2/x1; c = 1/sqrt(1+tangent^2); s = c*tangent; end end
0 100 C=COS(O),S=sin( 0) 00 Cx1 + Sx3 G(1,3,O sX1 FCx3 Ic, s=rotate(x(1), x(3)
, cos( ), sin( ) 0 0 0 1 0 0 0 1 0 0 0 0 = = − = c s s c c s G − + + = 4 1 3 2 1 3 4 3 2 1 (1,3, ) x sx cx x cx sx x x x x G [c,s]=rotate(x(1),x(3))
Reduction to Upper Triangular Form ×× ×× ×× ×× ×× × ×× ×× ×00 ××× ×× × ×× ×× ×× × 0×× 0×× 0×× 0 × 0×× 0× 00× 00 0×× 00× 00× 000
Reduction to Upper Triangular Form → → → → → → 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0