rha
2008-09-29, 10:48
我按照一本教材上的例子
A=[1 2 3;4 5 6;7 8 9]
y=[23;50;77]
求解x
按照x=inv(A)*y
或者x=A\y
求解,matlab都显示如下:
>> x=inv(A)*y
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 1.541976e-018.
x =
0
0
0
>> x=A\y
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 1.541976e-018.
x =
-29
62
-24
这是什么原因,正确答案应该是[1 2 6]'呀。
A=[1 2 3;4 5 6;7 8 9]
y=[23;50;77]
求解x
按照x=inv(A)*y
或者x=A\y
求解,matlab都显示如下:
>> x=inv(A)*y
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 1.541976e-018.
x =
0
0
0
>> x=A\y
Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 1.541976e-018.
x =
-29
62
-24
这是什么原因,正确答案应该是[1 2 6]'呀。