{"action":"created","issue":{"url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/117","labels_url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/117/labels{/name}","comments_url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/117/comments","events_url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/117/events","html_url":"https://github.com/viennacl/viennacl-dev/issues/117","id":54284704,"number":117,"title":"SVD singular value order","user":{"login":"Kerkil","id":2823773,"avatar_url":"https://avatars.githubusercontent.com/u/2823773?v=3","gravatar_id":"","url":"https://api.github.com/users/Kerkil","html_url":"https://github.com/Kerkil","followers_url":"https://api.github.com/users/Kerkil/followers","following_url":"https://api.github.com/users/Kerkil/following{/other_user}","gists_url":"https://api.github.com/users/Kerkil/gists{/gist_id}","starred_url":"https://api.github.com/users/Kerkil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kerkil/subscriptions","organizations_url":"https://api.github.com/users/Kerkil/orgs","repos_url":"https://api.github.com/users/Kerkil/repos","events_url":"https://api.github.com/users/Kerkil/events{/privacy}","received_events_url":"https://api.github.com/users/Kerkil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-14T05:07:26Z","updated_at":"2015-01-14T13:53:51Z","closed_at":null,"body":"I am taking an SVD of a matrix in ViennaCL and verifying the results against Matlab's SVD:\r\n```\r\nviennacl::linalg::svd(A, QL, QR);\r\n```\r\n\r\nWhile I think I am getting the right set of singular vectors, the order of the singular vectors does not match those from Matlab nor the sign of the vectors, assuming the singular values are all nonnegative. \r\n\r\nAre the singular values ordered in a decreasing fashion (max to min)? \r\n\r\nIs there a way to get singular values associated with the singular vectors as well? With the `svd` function that I am using now, I think I only get the two orthonormal bases (left and right singular vectors)."},"comment":{"url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/comments/69918463","html_url":"https://github.com/viennacl/viennacl-dev/issues/117#issuecomment-69918463","issue_url":"https://api.github.com/repos/viennacl/viennacl-dev/issues/117","id":69918463,"user":{"login":"Kerkil","id":2823773,"avatar_url":"https://avatars.githubusercontent.com/u/2823773?v=3","gravatar_id":"","url":"https://api.github.com/users/Kerkil","html_url":"https://github.com/Kerkil","followers_url":"https://api.github.com/users/Kerkil/followers","following_url":"https://api.github.com/users/Kerkil/following{/other_user}","gists_url":"https://api.github.com/users/Kerkil/gists{/gist_id}","starred_url":"https://api.github.com/users/Kerkil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kerkil/subscriptions","organizations_url":"https://api.github.com/users/Kerkil/orgs","repos_url":"https://api.github.com/users/Kerkil/repos","events_url":"https://api.github.com/users/Kerkil/events{/privacy}","received_events_url":"https://api.github.com/users/Kerkil/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T13:53:51Z","updated_at":"2015-01-14T13:53:51Z","body":"Thanks @karlrupp. Sorry for the confusion. My question is whether all the nonzero singular values are clustered together and come before zero singular values. I'd like to make sure that when I truncate the singular vector matrix by the rank of the matrix, all those singular vectors are associated only with nonzero singular values. Hope this clarifies my question a little bit more. "}}