Post Reply 
Creating an equation library (Updated 03-FEB-2017)
01-16-2015, 02:44 AM (This post was last modified: 01-16-2015 02:47 AM by Han.)
Post: #28
RE: Creating an equation library (updated)
Looks like the SVD command uses EIGENVV to obtain the matrix V and to determine the diagonal matrix of eigenvalues. Letting M0 be the matrix I mentioned earlier, then EIGENVV(M0*trn(M0)) gives

Code:
M0:=[[3,4.5,4.5],[4.5,12.25,1.25],[4.5,1.25,12.25]];
EIGENVV(M0*trn(M0));

The result:
Code:
{
[
 [−0.426401432711,0.904534033733,4.07681407754ᴇ−17],
 [−0.639602149067,−0.301511344578,0.707106781187],
 [−0.639602149067,−0.301511344578,−0.707106781187]
],
[
 [272.25,0,0],
 [0,−7.5863407865ᴇ−32,0],
 [0,0,121]
]
}

So the middle eigenvalue for M0*trn(M0) is a negative value. Take the square root and you get the eigenvalue found from doing SVD(M0). Note that the real part was dropped (likely due to roundoff).

(−7.5863407865E−32)^.5 = 1.48466797577e−30+2.75433127755e−16*i

I wonder if within the SVD algorithm, forcing the diagonal matrix from the eigen-decomposition to have all positive entries (they necessarily have to be, since they are supposed to be squares), would provide a quick fix for this issue.

There is, of course, always the option of writing our own SVD...

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Creating an equation library - Han - 01-10-2015, 03:45 AM
RE: Creating an equation library (updated) - Han - 01-16-2015 02:44 AM



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