Problem with the warning, "Matrix is Singular to Working Precision".
이전 댓글 표시
I've been experiencing an error while working in Matlab. When I try to run the program I'm using, an error message appears saying "Warning, matrix is singular to working precision". The program still runs, but all the values it is supposed to calculate evaluate to "Nan", which usually indicates that the mathematical procedure to calculate it failed to work properly. I think it occurs when the program tries to perform Gaussian elimination on the 44 by 44 matrix the program generates. I double-checked the matrix and most of the entries are zero, but I don't think it can be singular since its main diagonal doesn't have any zero entries. Does anyone know where this problem originates from and how to fix it?
Edit: Strangely, the error has changed after I switched to a smaller set of inputs. It now reads "matrix is close to singular or badly scaled", and automatically gives a RCOND value of 6.622407e-021. I'm not sure what the value means. The matrix description I gave above has not changed, except it is now 26 by 26 in size.
댓글 수: 2
Brian
2012년 11월 4일
Jonathan Epperl
2012년 11월 4일
편집: Jonathan Epperl
2012년 11월 4일
Just for future reference: The diagonal of a matrix doesn't give you any information on "how singular" the matrix is, unless it is diagonally dominant, i.e.
|diag element|>sum(|all other elements in the same row|)
or
|diag element|>sum(|all other elements in the same column|)
in which case the eigenvalues lie on the same side of the complex plane as the diagonal element and the matrix is thus non-singular.
답변 (2개)
Star Strider
2012년 11월 3일
2 개 추천
You are dealing with Sparse Matrices and they require special procedures. If you are solving linear equations for instance, consider using lsqr.
Walter Roberson
2012년 11월 3일
Consider this matrix:
[1 2 3 4;
2 4 6 8;
3 6 9 12;
4 8 12 16];
The matrix has no 0's on its main diagonal, but it is quite singular.
What does rank() report for the matrix? What does rcond() report ?
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!