Finding inv(A) for Ax=b system
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I tried 3 methods to solve the system for inv(A), where A is highly sparse matrix spy(A) is given below:
1) pinv(A)......... Matlab solve it in 190 sec without any warnings.
2) A\b............. Matlab took only 10 sec but gives warning "Matrix is singular to working precision"
3) [L,U]=lu(A); inv(L)*inv(U) .......... Matlab took 50 sec but give the same warning as in 2nd method.
Is there anyway, I can get inv(A) without warnings.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166370/image.jpeg)
3 commentaires
Jan
le 27 Juil 2017
Modifié(e) : Jan
le 27 Juil 2017
@Asif Arshid: What is your question? You observed that the slash operator has a different sensitivity to detect near to singular matrices than lu and inv(L)*inv(U). What is the condition number of the matrix? Do you think that slash is to pessimistic or the lu method too sloppy? Or are you surprised by the speed of the slash operator?
Réponses (1)
Star Strider
le 27 Juil 2017
4 commentaires
M.Shaarawy
le 20 Mai 2019
Is there regularized parameterized trust region sub problem (RPTRS) in MATLAB to solve this kind of problem?
Voir également
Catégories
En savoir plus sur Sparse Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!