Anonymous user
LU decomposition: Difference between revisions
→{{header|Matlab / Octave}}: format fix; change output from lang to pre (they can't be used as input)
(LU composition of Matlab / Octave) |
(→{{header|Matlab / Octave}}: format fix; change output from lang to pre (they can't be used as input)) |
||
Line 1,096:
=={{header|
LU decomposition is part of language
<lang Matlab> A = [
A = [▼
1 3 5
2 4 7
Line 1,108 ⟶ 1,107:
[L,U,P] = lu(A)</lang>
gives the output:
<pre>
1.00000 0.00000 0.00000
Line 1,125:
1 0 0
0 0 1
▲</lang>
2nd example:
<lang Matlab> A = [
Line 1,136 ⟶ 1,135:
[L,U,P] = lu(A)</lang>
gives the output:
<pre>
L =
1.00000 0.00000 0.00000 0.00000
Line 1,155:
0 0 1 0
0 1 0 0
0 0 0 1
=={{header|Python}}==
|