problem with rref function
5 次查看(过去 30 天)
显示 更早的评论
Hi All,
I was trying to solve a set of linear equations by using rref function. My matrix is a rectangular positive definite and the explicit form of the matrices are attached with this message. However, the rref works fine with matrix1 but it doesn't work for matrix2. The only change between the two matrices is at (13,23) element (68.4900 vs 61.6410). the matrix2 only gives bunch of 0.0s as solution. But my interest to get the numbers from the matrix2. How should i proceed? or where is my wrong.
Any comments will be highly appreciated
Thanks in advance
Sudipta
2 个评论
John D'Errico
2014-5-22
编辑:John D'Errico
2014-5-22
I know that you THINK you have given us the matrices in question, but you have not, unless that is EXACTLY as those numbers were entered into MATLAB. You have probably provided 7 digit approximations to those matrices. As such, those matrices would be useless as is.
采纳的回答
更多回答(1 个)
John D'Errico
2014-5-22
FURTHERMORE ... while you claim that matrix 1 is positive definite, it is a 22x23 matrix. Positive definite it is not.
By definition, a positive definite matrix is square. Time for some reading on your part.
Finally, lets look at Matrix1, AS you have given it to us.
svd(Matrix1)
ans =
5180
896.72
896.4
366.59
283.26
1
1
1
1
0.99998
0.99998
0.81686
0.81613
0.57785
0.57773
0.57772
0.57699
0.57698
0.57687
4.8302e-05
3.5355e-05
1.7948e-14
See that little number at the end? That tells me that your matrix is actually numerically singular as you have provided it.
rank(Matrix1)
ans =
21
When you changed one element, it was no longer numerically singular. In fact, it had rank 22.
rank(Matrix2)
ans =
22
Sorry, but it is time for you to re-read those linear algebra notes.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!