Schur decomposes matrix A to QR, where Q is unitary, and R is triangular.
mat | The matrix to be decomposed. |
details | If Q is to be calculated and returned. (Defaults to false, otherwise the return type is structure.) |
return value | The triangular R, or the structure {r:R, q:Q}, depending on the parameter 'details'. |
a = [444,42,827;804,8,12]';
s = qr(a,true)
s.q * s.q'
s.q * s.r