svds(X,r) and svd(X,'econ') generating different singular vectors for large complex matrix X ??

8 ビュー (過去 30 日間)
Hi,
I was trying to calculate truncated svd for a large complex matrix X. I noticed that svds(X,r) and svd(X,'econ') seemingly generate different U and V matrices, although the singular values are the same. For example,
A = randn(50,20) + 1i*randn(50,20);
[U,S,V] = svd(A,'econ');
[Ur,Sr,Vr] = svds(A,2);
U(1:4,1:2)
Ur(1:4,1:2)
S(1:2,1:2)
Sr(1:2,1:2)
But when X is small or real, two commands give the same results. For example,
A = randn(50,20);
[U,S,V] = svd(A,'econ');
[Ur,Sr,Vr] = svds(A,2);
U(1:4,1:2)
Ur(1:4,1:2)
S(1:2,1:2)
Sr(1:2,1:2)
Or,
A = randn(10,5) + 1i*randn(10,5);
[U,S,V] = svd(A,'econ');
[Ur,Sr,Vr] = svds(A,2);
U(1:4,1:2)
Ur(1:4,1:2)
S(1:2,1:2)
Sr(1:2,1:2)
Did I misunderstand something? Thanks in advance!

採用された回答

Bruno Luong
Bruno Luong 2021 年 4 月 9 日
編集済み: Bruno Luong 2021 年 4 月 9 日
The singular value (eigen) decomposition SVD/SVDS is not unique, vectors is up to scaling, (values is up to order for eigen value decomposition - EIG/EIGS), and I'm not talking about multiple singular/eigen values (order > 1).
If you do
U(:,1:2)./Ur(:,1:2)
abs(U(:,1:2)./Ur(:,1:2))
after your code, you can clearly observe they are just proportonal by a unit complex scaling.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by