Talk:LU decomposition: Difference between revisions
Content added Content deleted
(matlab code gives wrong results) |
|||
Line 21: | Line 21: | ||
I think the permutation matrix you proposed makes more sense as well. |
I think the permutation matrix you proposed makes more sense as well. |
||
== Matlab code is wrong == |
|||
Please lock at the following example |
|||
A=[1 2 -1 0;2 4 -2 -1; -3 -5 6 1; -1 2 8 -2] |
|||
the code returns nonsense for U, namely |
|||
U = |
|||
0 0 0 -1.0000 |
|||
0.5000 1.0000 -0.5000 0 |
|||
-0.1429 0 1.0000 0.2857 |
|||
0.1563 0 0 1.0000 |
|||
I presume the reason is the permutation matrix. I will try to correct it. |