- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sir/Madam,
According to the example of the Singular Value Decomposition (SVD) functions, for instance dgesvd, the left singular vectors, U, should have the dimensions mxm (see snippet below).
The routine computes the singular value decomposition (SVD) of a real m-by-n matrix A, optionally computing the left and/or right singular vectors. The SVD is written as
A = U*SIGMA*VT
where SIGMA is an m-by-n matrix which is zero except for its min(m,n) diagonal elements, U is an m-by-m orthogonal matrix and VT (V transposed) is an n-by-n orthogonal matrix.
However, in the results snippet
Left singular vectors (stored columnwise)
-0.59 0.26 0.36 0.31 0.23
-0.40 0.24 -0.22 -0.75 -0.36
-0.03 -0.60 -0.45 0.23 -0.31
-0.43 0.24 -0.69 0.33 0.16
-0.47 -0.35 0.39 0.16 -0.52
0.29 0.58 -0.02 0.38 -0.65
the matrix is only printed as mxn.
print_matrix( "Left singular vectors (stored columnwise)", m, n, u, ldu );
Shouldn't the line above be
print_matrix( "Left singular vectors (stored columnwise)", m, m, u, ldu );
?
Could you please update all SVD examples? Or in case I misunderstood, could you please explain to me why U is printed as mxn?
Kind regards
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good catch! U is mxm. We will correct it.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page