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|MatlabMATLAB}} / {{header|Octave}}==
 
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>
<lang Matlab> L =
AL = [
 
1.00000 0.00000 0.00000
Line 1,125:
1 0 0
0 0 1
</langpre>
 
</lang>
2nd example:
<lang Matlab> A = [
Line 1,136 ⟶ 1,135:
[L,U,P] = lu(A)</lang>
gives the output:
<pre>
<lang Matlab> L =
L =
 
1.00000 0.00000 0.00000 0.00000
Line 1,155:
0 0 1 0
0 1 0 0
0 0 0 1
</langpre>
 
=={{header|Python}}==
Anonymous user