QR decomposition: Difference between revisions
Content added Content deleted
(QR decomposition with Numeric.LinearAlgebra) |
|||
Line 1,991: | Line 1,991: | ||
=={{header|Maple}}== |
=={{header|Maple}}== |
||
<lang Maple> |
<lang Maple>with(LinearAlgebra): |
||
A:=<12,-51,4;6,167,-68;-4,24,-41>: |
|||
with(LinearAlgebra): |
|||
Q,R:=QRDecomposition(A): |
|||
⚫ | |||
⚫ | |||
{{out}} |
|||
Q,R := QRDecomposition( evalf( <<12|-51|4>,<6|167|-68>,<-4|24|-41>>) ): |
|||
<pre> [ -69 -58 ] |
|||
[6/7 --- --- ] |
|||
[ 175 175 ] |
|||
⚫ | |||
[ 158 ] |
|||
[3/7 --- 6/175] |
|||
[ 175 ] |
|||
⚫ | |||
[ -33 ] |
|||
[-2/7 6/35 --- ] |
|||
[ 35 ] |
|||
⚫ | |||
R; |
|||
⚫ | |||
Output: |
|||
<pre> |
|||
[-0.857142857142857 0.394285714285714 0.331428571428571] |
|||
⚫ | |||
[-0.428571428571429 -0.902857142857143 -0.0342857142857143] |
|||
⚫ | |||
[ 0.285714285714286 -0.171428571428571 0.942857142857143] |
|||
[14 21 -14] |
|||
[ ] |
|||
[ 0 175 -70] |
|||
[ ] |
|||
[ 0 0 35]</pre> |
|||
</pre> |
|||
=={{header|Mathematica}}== |
=={{header|Mathematica}}== |