XLPack 7.0
XLPack Numerical Library (Excel Worksheet Functions) Reference Manual
Loading...
Searching...
No Matches

◆ WZgesvd2()

Function WZgesvd2 ( Jobu As  String,
JobVt As  String,
M As  Long,
N As  Long,
A As  Variant 
)

Singular value decomposition (SVD) of a complex matrix (complex numbers in pairs of cells)

Purpose
WZgesvd2 computes the singular value decomposition (SVD) of a complex M x N matrix A, optionally computing the left and/or right singular vectors. The SVD is written
A = U * Σ * V^H
where Σ is an M x N matrix which is zero except for its min(M, N) diagonal elements, U is an M x M unitary matrix, and V is an N x N unitary matrix. The diagonal elements of Σ are the singular values of A. They are real and non-negative, and are returned in descending order. The first min(M, N) columns of U and V are the left and right singular vectors of A.

Note that the routine returns V^H, not V.

To represent complex numbers, a real part and an imaginary part are stored in a pair of adjacent cells (a real part in a left cell, and an imaginary part in a right cell). The computed results are stored in the same way.
Returns
min(M, N)+1 x 1 (Jobu = "N", Jobvt = "N")
Column 1
Rows 1 to min(M, N)Singular values (in descending order)
Row min(M, N)+1Return code
M+1 x 2M+1 (Jobu = "A", Jobvt = "N")
Column 1Columns 2 to 2M+1
Rows 1 to MSingular values (in descending order) (Rows 1 to min(M, N))Left unitary matrix U
Row M+1Return code0
N+1 x 2N+1 (Jobu = "N", Jobvt = "A")
Column 1Columns 2 to 2N+1
Rows 1 to NSingular values (in descending order) (Rows 1 to min(M, N))Transpose of right unitary matrix V (V^H)
Row N+1Return code0
max(M,N)+1 x 2M+2N+1 (Jobu = "A", Jobvt = "A")
Column 1Columns 2 to 2M+1Columns 2M+2 to 2M+2N+1
Rows 1 to max(M,N)Singular values (in descending order) (Rows 1 to min(M, N))Left unitary matrix U (Rows 1 to M)Transpose of right unitary matrix V (V^H) (Rows 1 to N)
Row max(M,N)+1Return code00

Return code.
= 0: Successful exit.
= i > 0: i super-diagonals of an intermediate bidiagonal form did not converge to zero.
Parameters
[in]Jobu= "N": Do not compute left unitary matrix U.
= "A": Compute left unitary matrix U.
[in]Jobvt= "N": Do not compute transpose of right unitary matrix V (V^H).
= "A": Compute transpose of right unitary matrix V (V^H).
[in]MNumber of rows of the input matrix A. (M >= 1)
[in]NNumber of columns of the input matrix A. (N >= 1)
[in]A(M x 2N) M x N complex matrix A.
Reference
LAPACK
Example
Compute singular values and left and right singular vectors of matrix A, where
( 0.20-0.11i -0.93-0.32i 0.81+0.37i )
A = ( -0.80-0.92i -0.29+0.86i 0.64+0.51i )
( 0.71+0.59i -0.15+0.19i 0.20+0.94i )

WZgesvd2