Jump to content

QR decomposition: Difference between revisions

+Stata
(Adding SequenceL Version)
(+Stata)
Line 2,255:
</pre>
 
=={{header|Stata}}==
<lang stata>mata
: qrd(a=(12,-51,4\6,167,-68\-4,24,-41),q=.,r=.)
 
: a
1 2 3
+-------------------+
1 | 12 -51 4 |
2 | 6 167 -68 |
3 | -4 24 -41 |
+-------------------+
 
: q
1 2 3
+----------------------------------------------+
1 | -.8571428571 .3942857143 .3314285714 |
2 | -.4285714286 -.9028571429 -.0342857143 |
3 | .2857142857 -.1714285714 .9428571429 |
+----------------------------------------------+
 
: r
1 2 3
+----------------------+
1 | -14 -21 14 |
2 | 0 -175 70 |
3 | 0 0 -35 |
+----------------------+</lang>
=={{header|Tcl}}==
Assuming the presence of the Tcl solutions to these tasks: [[Element-wise operations]], [[Matrix multiplication]], [[Matrix transposition]]
1,336

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.