Errors while solving an inverted matrix in Matlab

  • Context: MATLAB 
  • Thread starter Thread starter jen0leb
  • Start date Start date
  • Tags Tags
    Errors Matlab Matrix
Click For Summary
SUMMARY

The discussion centers on the challenges of solving for coefficients using the inverse function on matrices in Matlab, specifically when dealing with nearly singular matrices. The user encountered a warning indicating that the matrix is close to singular, leading to potentially inaccurate results. A suggested solution is to utilize the pseudo-inverse instead of the standard inverse to address this issue effectively. This approach is recommended for improving the accuracy of results when working with small numbers in matrix calculations.

PREREQUISITES
  • Understanding of matrix operations in Matlab, specifically the inverse function.
  • Familiarity with the concept of singular matrices and their implications in numerical computations.
  • Knowledge of pseudo-inverse calculations and their applications in solving linear equations.
  • Basic proficiency in using Matlab for mathematical modeling and data analysis.
NEXT STEPS
  • Research how to implement the pseudo-inverse in Matlab using the 'pinv' function.
  • Explore numerical stability techniques for handling nearly singular matrices in Matlab.
  • Learn about alternative methods for solving linear equations, such as QR decomposition.
  • Investigate the implications of matrix scaling on the accuracy of numerical results in Matlab.
USEFUL FOR

Matlab users, data analysts, and researchers dealing with linear algebra problems, particularly those facing challenges with nearly singular matrices and seeking accurate solutions for coefficient calculations.

jen0leb
Messages
6
Reaction score
0
Hey,
i've been trying to find a better fit for a correlation, the numbers I'm dealing with are really small and when i try to solve for the coefficients using the inverse function on the matrices in Matlab i get this error:

Warning: Matrix is close to singular or badly scaled. Results
may be inaccurate. RCOND = 5.541639e-25.

I tried solving the inverted matrix in excel and the results didn't make much sense either! is there an other way to solve this problem? I really can't solve it by hand it'll take me ages.

i'm open to any suggestion...

J.
 
Physics news on Phys.org
jen0leb said:
is there an other way to solve this problem?

You might have better luck if you stated the problem you are trying to solve rather than making the problem "How do I numerically invert a nearly singular matrix?".

If the problem is going to be "How do I numerically invert a nearly singular matrix?" then this link might help.http://www.mathworks.com/matlabcentral/newsreader/view_thread/157000 It suggests using a pseudo-inverse instead of an inverse.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 18 ·
Replies
18
Views
6K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K