Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/LU-decomposition/Mathematica/lu-decomposition.math
Normal file
13
Task/LU-decomposition/Mathematica/lu-decomposition.math
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
(*Ex1*)a = {{1, 3, 5}, {2, 4, 7}, {1, 1, 0}};
|
||||
{lu, p, c} = LUDecomposition[a];
|
||||
l = LowerTriangularize[lu, -1] + IdentityMatrix[Length[p]];
|
||||
u = UpperTriangularize[lu];
|
||||
P = Part[IdentityMatrix[Length[p]], p] ;
|
||||
MatrixForm /@ {P.a , P, l, u, l.u}
|
||||
|
||||
(*Ex2*)a = {{11, 9, 24, 2}, {1, 5, 2, 6}, {3, 17, 18, 1}, {2, 5, 7, 1}};
|
||||
{lu, p, c} = LUDecomposition[a];
|
||||
l = LowerTriangularize[lu, -1] + IdentityMatrix[Length[p]];
|
||||
u = UpperTriangularize[lu];
|
||||
P = Part[IdentityMatrix[Length[p]], p] ;
|
||||
MatrixForm /@ {P.a , P, l, u, l.u}
|
||||
Loading…
Add table
Add a link
Reference in a new issue