How do I compute the pseudo-inverse of a matrix using QR decomposition with column pivoting?

조회 수: 6 (최근 30일)
How do I compute the pseudo-inverse of a matrix using QR decomposition with column pivoting in MATLAB R2021b?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2022년 5월 26일
We have a function:
>> x = lsqminnorm(A, b)
which uses QR decomposition with column pivoting behind the scenes and returns the equivalent of
>> x = pinv(A)*b
If you want to do this repeatedly for different vectors “b”, you can do the following:
>> dA = decomposition(A, 'cod');
>> x = dA \ b;
While we don’t have a function that computes the pseudo-inverse itself with this method, it’s possible to get it like so:
>> lsqminnorm(A, eye(size(A, 1)))
Finally, note that in the low-rank case, “lsqminnorm” computes an additional RQ decomposition of the matrix R to get a low-rank decomposition of the matrix A (using the LAPACK function “dtzrzf”).

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by