About LU factorization
|
06-04-2015, 02:12 PM
Post: #15
|
|||
|
|||
RE: About LU factorization
I get:
M1:=[[2,1,1],[−2,7,2],[4,−6,0]]; // Your matrix input ... L1:=LU(M1); // --> {[[1,0,0],[−0.5,1,0],[0.5,1,1]],[[4,−6,0],[0,4,2],[0,0,−1]],[[0,0,1],[0,1,0],[1,0,0]]} L1(1)*L1(2)/L1(3); // --> [[2,1,1],[−2,7,2],[4,−6,0]] ...Your matrix back again My list (L1) is simply the Lower Triangular, Upper Triangular, and Permutation matrices, which is what the help description states. You get: M1:= [[2,1,1], [-2,7,2], [4,-6,0]]; // Same matrix as above LU(M1); // -> {[1,2,3], [[1,0,0], [-1,1,0], [2,-1,1]], [[2,1,1], [0,8,3], [0,0,1]]} If you set L1 to your list, then L1(2)*L1(3) returns your original matrix. There's a different format in our list results, you get a vector and the Lower and Upper triangular matrices. Something seems to have changed in the versions, but both results seem to be okay. -Dale- |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)