Errors while solving an inverted matrix in Matlab

In summary, the speaker is struggling to find a better fit for a correlation due to small numbers and attempts to solve for the coefficients using the inverse function on matrices in Matlab result in an error warning. They also tried solving the inverted matrix in Excel but the results were not helpful. They are seeking alternative solutions and mention the possibility of using a pseudo-inverse.
  • #1
jen0leb
7
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
  • #2
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.
 

1. What is an inverted matrix in Matlab?

An inverted matrix in Matlab is the result of applying the inverse function to a square matrix, which essentially reverses the rows and columns of the original matrix. This can be useful in solving systems of linear equations and performing other mathematical operations.

2. Why am I getting errors while trying to solve an inverted matrix in Matlab?

There can be several reasons for errors while solving an inverted matrix in Matlab. Some common causes include attempting to invert a non-square matrix, using incorrectly sized matrices in the calculation, or trying to invert a matrix with a determinant of zero.

3. How can I fix errors while solving an inverted matrix in Matlab?

To fix errors while solving an inverted matrix in Matlab, you can try checking the dimensions of your matrices, making sure they are square and correctly sized for the operation. You can also verify that the matrix you are trying to invert has a non-zero determinant. In some cases, using a different method to solve the problem may also help resolve errors.

4. Can I invert a singular matrix in Matlab?

No, a singular matrix, meaning a matrix with a determinant of zero, cannot be inverted in Matlab. This is because the inverse function requires the determinant to be non-zero in order to calculate the inverted matrix. You may need to use other methods or techniques to solve problems involving singular matrices.

5. Are there any tips for avoiding errors while solving an inverted matrix in Matlab?

Yes, there are a few tips that can help you avoid errors while solving an inverted matrix in Matlab. First, always check the dimensions and properties of your matrices before attempting to invert them. Also, make sure to use the appropriate function for the type of matrix you are working with. Additionally, it is helpful to have a basic understanding of matrix operations and properties to identify and troubleshoot errors more easily.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
18
Views
5K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
Back
Top