AlmostQR -- QR decomposition of a matrix |
Syntax |
AlmostQR(M: MAT): RECORD |
Description |
Example |
/**/ M := matrix([ [4, -2, 3], [3, 2, -2], [0, 0, 3] ]); /**/ Dec := AlmostQR(M); /**/ indent(Dec); record[ Q := matrix(QQ, [[4, -42/25, 0], [3, 56/25, 0], [0, 0, 3]]), R := matrix(QQ, [[1, -2/25, 6/25], [0, 1, -17/14], [0, 0, 1]]) ] /**/ $mat.SimplifySquareFactorsInAQR(ref Dec); /**/ indent(Dec); record[ Q := matrix(QQ, [[4/5, -3/5, 0], [3/5, 4/5, 0], [0, 0, 1]]), R := matrix(QQ, [[5, -2/5, 6/5], [0, 14/5, -17/5], [0, 0, 3]]), SqDiag := [1, 1, 1] ] |
See Also |