Matrix is close to singular or badly scaled.

2 次查看(过去 30 天)
I'm using MATLAB for some homework problems. One such problem:
consider the vectors:
u1 = [5,8,7,12,11]'
u2 = [2,0,8,8,12]'
u3 = [4,6,10,0,0]'
u4 = [6,8,0,4,0]'
u5 = [18,16,24,32,36]'
If the following vector in the span of the above collection?
b = [23,23,33,29,32]'
So, I make a matrix, and test it, like so:
A = [u1,u2,u3,u4,u5]
A\b
I get the following output:
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.331141e-18
ans =
1.0e+14 *
0
4.0097
0
-2.6731
1.3366
May I basically conclude that it is not in the span of the collection? I tried a similar method with other vectors and got precise answers with no warning.
I'm a little concerned about the warning, and I'm certain my professor doesn't expect answers with 14 decimal places.
Could someone please explain the warning? Also, what does the RCOND mean?
Thanks!

采纳的回答

Matt J
Matt J 2012-10-5
编辑:Matt J 2012-10-5
A hint about your original problem: What can you deduce from the following?
>> rank([A,b])
ans =
5
As for the meaning of RCOND, it is a way of quantifying how invertible a matrix is. Formally, it is the reciprocal of the condition number of A, which you can read about here,
  1 个评论
Clark
Clark 2012-10-5
rank(A) = 4
rank([A,b]) = 5
Therefore, there are no solutions (no such linear combination).
Thanks for the info about RCOND as well!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by