Post Reply 
SVD Only With Matrix of Full Rank?
04-03-2015, 04:44 PM
Post: #3
RE: SVD Only With Matrix of Full Rank?
I have modified the implementation in Xcas. It will handle 0 as singular value.
Code:

m1:=[ [8 ,2 ,2 ,-6], [5, 0, 3, -4], [-2 ,-3 ,3 ,1], [2 ,3 ,-3, -1], [4, 6 ,-6 ,-2] ];
u,s,q:=SVD(m1);
m:=u*[op(diag(s)*trn(q)),[0$4]]
Then m is equal to m1 up to numerical errors, but the quick and dirty algorithm I' using is unfortunately far from optimal for numerical stability if 0 is a singular value, especially here where it has multiplicity >1.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: SVD Only With Matrix of Full Rank? - parisse - 04-03-2015 04:44 PM



User(s) browsing this thread: 1 Guest(s)