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

4 次查看(过去 30 天)

采纳的回答

MathWorks Support Team
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