Skip to content

gsvd

builtin · libnexusinterp/corefcn/gsvd-proprietary.cc

: s = gsvd (A, B)
: [U, V, X, C, S] = gsvd (A, B)
: […] = gsvd (A, B, 0)
: […] = gsvd (A, B, "econ")

Compute the generalized singular value decomposition of the matrix pair A (m-by-p) and B (n-by-p), which must have the same number of columns.

With one output, s is the column of generalized singular values in ascending order. These are the ratios of the diagonal entries of C’*C and S’*S, under a square root.

With several outputs the factors satisfy A = U*C*X' and B = V*S*X', where U and V are unitary, C and S are real, nonnegative and obey C'*C + S'*S = eye (p). The leading outputs are returned if fewer than five are requested.

A third argument of 0 or "econ" selects the economy-size form. Any other value of the third argument is ignored.

Inputs containing NaN or Inf, empty inputs and non-numeric inputs are errors.