- ‘pinv’ requires costly SVD.
- ‘pinv’ does not work with sparse matrix.
Computing generalized Inverse of a square but sparse matrix?
조회 수: 43 (최근 30일)
이전 댓글 표시
I am trying to find the generalized inverse of a square and sparse matrix. I am using Matlab, however pinv(matrix) doesn't work for sparse matrices. If you have any suggestion or algorithm, please share. Thanks in advance.
댓글 수: 0
채택된 답변
Rishabh Mishra
2020년 12월 21일
Hi,
The disadvantages of using ‘pinv’ to find inverse of sparse matrix are:
Instead, you can use the function ‘pseudo-inverse’ for the same purpose. Refer the following link for documentation of ‘pseudo-inverse’ function.
Hope this helps!
댓글 수: 0
추가 답변 (1개)
Christine Tobler
2021년 1월 8일
If you want to apply pinv(A)*b, you can instead use lsqminnorm(A, b), which also works for sparse matrices and does something equivalent (using QR decomposition instead of SVD).
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!