#### Archived

This topic is now archived and is closed to further replies.

# singular value decomposition?

This topic is 5391 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, I need to solve a homogeneous system A.x = 0, where matrix A has 8 rows and 9 columns. I saw a paper that suggests to use singular value decomposition (SVD) to solve for x. I googled and find defintions of SVD, but I don''t know how to implement it. Also, I think I can use gauss elimination as an alternative method, and it''s easier to implement than SVD. But I heard that SVD is faster. Any suggestions?

##### Share on other sites
As to how to implement it, I found my SVD algorithm in numerical recipies in C ( if I remember correctly ).

When I programmed the algorithm as the book present it, I had a little problem though, the order of the singular value was not 100% correct, so I had to correct it. Again, if I remember correctly, it was something along the line of swapping the last two values ( and corresponding row and column of left and right matrices ).

I don''t know if SVD is the solution for that kind of problem though, I personally used it in a very different context.

##### Share on other sites
This time, Google isn''t your only friend. Numerical Recipes is a valuable ressource for these kind of problems :

http://www.library.cornell.edu/nr/bookcpdf.html (chapter 2.6)

Some code for SVD
http://www.magic-software.com/Source/Math/WmlMatrix3.cpp

##### Share on other sites
Even if SVD is faster in some case, which I doubt, it is not stable. Gaussian elimination with either sort of pivoting will be more stable.

##### Share on other sites
What''s the purpose of the SVD, I want to know but I''m to lazy to clicky.

##### Share on other sites
if you want to solve a linear system that is Ax=b ( A is matrix x,b :are vectors)
but A is singular you cannot use standart methods ( Gaussian Elimination etc fails ) That why SVD is used.
If you have more equation than independent variable I suggest you to use pseudoinverse. That is something like

x=inverse(AT*A)*AT*b, AT is transpose of A.

##### Share on other sites
quote:
What's the purpose of the SVD, I want to know but I'm to lazy to clicky.

Don't be lazy. That will get you fired from McDonald's, .

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

[edited by - grhodes_at_work on October 17, 2003 10:31:18 AM]

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 23
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631766
• Total Posts
3002233
×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!