How do I compute the pseudo-inverse of a matrix using QR decomposition with column pivoting?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 26 Mai 2022
Beantwortet: MathWorks Support Team
am 26 Mai 2022
How do I compute the pseudo-inverse of a matrix using QR decomposition with column pivoting in MATLAB R2021b?
Akzeptierte Antwort
MathWorks Support Team
am 26 Mai 2022
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!