Jump to content

QR decomposition: Difference between revisions

added Julia example
(Updated D entry)
(added Julia example)
Line 1,143:
1 2 3</lang>
'''Notes''':J offers a built-in QR decomposition function, <tt>128!:0</tt>. If J did not offer this function as a built-in, it could written in J along the lines of the second version, which is covered in [[j:Essays/QR Decomposition|an essay on the J wiki]].
 
=={{header|Julia}}==
Built-in function
<lang julia>Q, R = qr([12 -51 4; 6 167 -68; -4 24 -41])</lang>
{{out}}
<pre>
(
3x3 Array{Float64,2}:
-0.857143 0.394286 0.331429
-0.428571 -0.902857 -0.0342857
0.285714 -0.171429 0.942857 ,
 
3x3 Array{Float64,2}:
-14.0 -21.0 14.0
0.0 -175.0 70.0
0.0 0.0 -35.0)
</pre>
 
=={{header|Mathematica}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.