矩阵分解:将矩阵分解为几个矩阵的乘积
>> A=[2 5 4 1;1 3 2 1;2 10 9 7;3 8 9 2];
>> b=[20 11 40 37]';
>> Y=inv(L)*P*b;
>> x=inv(U)*Yx =
1.0000
2.0000
2.0000
0>> x=A\b
x =
1.0000
2.0000
2.0000
-0.0000
矩阵分解:将矩阵分解为几个矩阵的乘积
>> A=[2 5 4 1;1 3 2 1;2 10 9 7;3 8 9 2];
>> b=[20 11 40 37]';
>> Y=inv(L)*P*b;
>> x=inv(U)*Yx =
1.0000
2.0000
2.0000
0>> x=A\b
x =
1.0000
2.0000
2.0000
-0.0000