W
W
Whiteha2013-12-13 00:16:04
C++ / C#
Whiteha, 2013-12-13 00:16:04

C++ implementation of the singular value decomposition(SVD)?

There was a need to look for a singular value decomposition of a matrix in C ++, I’ll immediately make a reservation that, unfortunately, I don’t understand the geometric ins and outs, I only know that for the decomposition found, the following relation must be satisfied in the matrix form A = U * W * V ^ T, where the matrices are U, W, V are the result of the decomposition of SVD(A), and ^T is the transposition operation.
Found a ready implementation here . For a matrix
MvIhgEDZds.png
, it produces the following
result TFqrdM6M0t.png.
However, mathcad disagrees and thinks a little differently, like this: The
3SmGE61FRy.png
question is - why does this implementation correctly calculate numbers, but confuse them in places and be smart with signs? If it is not working, then where can I find a working one?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question