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.
No products are associated with this question.
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 ?