Has QR [Q,R,E]=qr(X,0) changed? licols for extracting lin indep cols is not working

1 回表示 (過去 30 日間)
Henry Wolkowicz
Henry Wolkowicz 2021 年 10 月 28 日
回答済み: Bruno Luong 2021 年 10 月 28 日
I am using the downloaded code licols.m for extracting a lin indep set of columns from a matrix. It is based on the qr algorithm in the form
[q,r,e] = qr(X,0);
The algorithm is based on the diagonal of r dominating the upper triangular parts and the diagonal of r (in abs value) being nonincreasing. But my examples/random problems illustrate that this is not true for r. Has QR changed? If so, then licols.m needs to be modified.
Is there older version of qr around to use with licols?

回答 (1 件)

Bruno Luong
Bruno Luong 2021 年 10 月 28 日
It seems working fine on random matrix (R2021b online server or my PC)
X=randn(1000);
[q,r,e] = qr(X,0);
issorted(abs(diag(r)),"descend")
ans = logical
1

カテゴリ

Help Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by