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

9 次查看(过去 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 CenterFile Exchange 中查找有关 Eigenvalues 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by