Permutation matrix P in the qr function
Show older comments
Hello,
I understand that using the following sintax
[Q,R,P]=qr(A)
I obtain the QR decomposition of the matrix A and, P is a permutation matrix that reorder A such that AP=QR where abs(diag(R)) is decreasing.
How this matrix P is obtained?
Let's call the new matrx B=AP. Are the columns of the matrix B ordered from the most to the least independent?
Thank you in advance,
Gabri
Accepted Answer
More Answers (1)
Shiva Kalyan Diwakaruni
on 9 Mar 2021
0 votes
Permutation information, returned as a matrix or vector. The shape of P depends on the value of outputForm. Also, qr selects P to satisfy different criteria depending on whether the first input matrix is full or sparse:
- Full — qr selects P so that abs(diag(R)) is decreasing.
- Sparse — qr selects P to reduce fill-in in R.
please refer to the below link for more information
hope it helps,
thanks.
1 Comment
Gabriele Galli
on 9 Mar 2021
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!