Matrix Inverse calculation problem.

2 views (last 30 days)
Rajeev Prajapati
Rajeev Prajapati on 25 May 2015
Commented: Bjorn Gustavsson on 26 May 2015
help me with it.
  1 Comment
Geoff Hayes
Geoff Hayes on 25 May 2015
Rajeev - please describe (or show) what you have tried so far. Indicate which part of the code you are having problems with or not understanding.

Sign in to comment.

Answers (1)

Mark Stone
Mark Stone on 25 May 2015
Edited: Mark Stone on 25 May 2015
If you have a matrix A, and want to calculate the inverse of it using MATLAB, then inv(A) is the inverse of A. If this is not sufficient to answer your question, then you need to explain what you are trying to do.
  4 Comments
Mark Stone
Mark Stone on 25 May 2015
Edited: Mark Stone on 25 May 2015
pinv is just the ticket for linear least squares. solution = pinv(A) * b , computed using rock solid SVD, much more reliable than A\b .
I'm not quite sure why anyone, including me, is humoring the O.P. given the question as posed. I chose not to enter into a discussion that, often or usually, the inverse isn't needed, and you should use \ or whatever. I was leaving that for round 2 when/if the O.P. asked a reasonable question.
Bjorn Gustavsson
Bjorn Gustavsson on 26 May 2015
Mark, I agree on all(most) all counts - the only objection I have is that when solving ill-conditioned inverse problems one should always look carefully at the eigenvalues and eigenvectors (and consider the full range of suitable regularizations).

Sign in to comment.

Categories

Find more on Linear Algebra in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!