Warning: Matrix is singular to working precision.

In summary, the conversation discusses a warning that appears when generating a matrix in MATLAB. The user is unsure why the warning is showing and believes it may be related to the range of values being used. They also mention not understanding how to work around this issue.
  • #1
mikeph
1,235
18
Hello

I am generating a matrix which is coming up with this warning.

I know the matrix elements are correct though, as I put them in. But when I work with the matrix, the results don't make sense. I presume this warning is the reason.

Can anyone help? I don't understand why MATLAB can't just store the data I put in it properly. It is in the range 10^1 - 10^12. Is it just working to a single power and losing all the data which does not appear in the decimal representation? (rather than storing the exponent).

I don't understand how it works or how to work around this.

Thanks,
Mike
 
Physics news on Phys.org
  • #2
It's not clear to me why you think MATLAB is NOT storing the data you put in. A matrix will be "singular to working precision" if its determinant is less than that precision. What is the determinant of your matrix?
 
  • #3
It is not square.

Perhaps this is not the reason I am getting an error later on, it just seems to be a good candidate for investigation!
 

1. What does the warning "Matrix is singular to working precision" mean?

The warning means that the matrix being used in a calculation is too close to being a singular matrix, meaning it is almost impossible to invert or solve. This can result in inaccurate or undefined solutions.

2. Why does this warning occur?

This warning occurs when a matrix is ill-conditioned, meaning that its condition number is very high. This can happen when the matrix is nearly singular, has very small or large numbers, or has a large discrepancy in the magnitudes of its elements.

3. How does this warning affect my calculations?

This warning can affect your calculations by producing inaccurate results or causing the calculation to fail altogether. It is important to address the warning and find a way to improve the condition of the matrix in order to obtain more reliable results.

4. How can I fix this warning?

To fix this warning, you can try using a more accurate or robust algorithm for solving the matrix, scaling the matrix to reduce the condition number, or using a different matrix altogether if possible. In some cases, it may also be helpful to increase the precision or tolerance of your calculations.

5. Can I ignore this warning?

It is not recommended to ignore this warning, as it indicates a potential issue with the accuracy of your calculations. Ignoring it may lead to incorrect results or unexpected errors. It is important to investigate the cause of the warning and address it appropriately.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
18
Views
5K
  • Calculus and Beyond Homework Help
Replies
1
Views
635
  • Calculus and Beyond Homework Help
Replies
0
Views
146
  • Programming and Computer Science
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
380
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Introductory Physics Homework Help
Replies
2
Views
291
  • Advanced Physics Homework Help
Replies
1
Views
1K
Back
Top