LU decomposition: Difference between revisions

(Updated D entry)
Line 1,349:
3 17 18 1
2 5 7 1</lang>
 
 
=={{header|Maple}}==
<lang Maple>
A:=<<1.0|3.0|5.0>,<2.0|4.0|7.0>,<1.0|1.0|0.0>>:
 
LinearAlgebra:-LUDecomposition(A);
</lang>
Output:
<pre>
[0 1 0] [ 1.0 0. 0.] [2. 4. 7.]
[ ] [ ] [ ]
[1 0 0], [0.500000000000000 1.0 0.], [0. 1. 1.50000000000000]
[ ] [ ] [ ]
[0 0 1] [0.500000000000000 -1. 1.0] [0. 0. -2.]
</pre>
<lang Maple>
A:=<<11.0|9.0|24.0|2.0>,<1.0|5.0|2.0|6.0>,
<3.0|17.0|18.0|1.0>,<2.0|5.0|7.0|1.0>>:
 
with(LinearAlgebra):
 
LUDecomposition(A);
</lang>
Output:
<pre>
[1 0 0 0]
[ ]
[0 0 1 0]
[ ],
[0 1 0 0]
[ ]
[0 0 0 1]
 
[ 1.0 0. 0. 0.]
[ ]
[ 0.272727272727273 1.0 0. 0.]
[ ],
[0.0909090909090909 0.287500000000000 1.0 0.]
[ ]
[ 0.181818181818182 0.231250000000000 0.00359712230215807 1.0]
 
[11. 9. 24. 2.]
[ ]
[ 0. 14.5454545454545 11.4545454545455 0.454545454545455]
[ ]
[ 0. 0. -3.47500000000000 5.68750000000000]
[ ]
[ 0. 0. 0. 0.510791366906476]
 
</pre>
 
=={{header|Mathematica}}==
Anonymous user