Matrix Inverse calculation problem.
显示 更早的评论
help me with it.
1 个评论
Geoff Hayes
2015-5-25
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.
回答(1 个)
Mark Stone
2015-5-25
编辑:Mark Stone
2015-5-25
0 个投票
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 个评论
Walter Roberson
2015-5-25
inv(A) should not often be used. pinv() or the backslash operator are usually better choices.
Bjorn Gustavsson
2015-5-25
Whenever pinv is necessary to use it is strongly advisable to not use it. When trying to invert very illconditioned matrices or solve very ill-determined systems of equations surely it is strongly preferable to have better grasp of what is going on than pinv provides - that is a full, or partial, SVD decomposition is the better choice to start the analysis.
Mark Stone
2015-5-25
编辑:Mark Stone
2015-5-25
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
2015-5-26
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).
类别
在 帮助中心 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!