ZGGSVD Example

To find the generalized singular value decomposition

A = U$\displaystyle \Sigma_{1}^{}$$\displaystyle \left(\vphantom{
\begin{array}{cc}
0 & R
\end{array} }\right.$$\displaystyle \begin{array}{cc}
0 & R
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{cc}
0 & R
\end{array} }\right)$QH,  B = V$\displaystyle \Sigma_{2}^{}$$\displaystyle \left(\vphantom{
\begin{array}{cc}
0 & R
\end{array} }\right.$$\displaystyle \begin{array}{cc}
0 & R
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{cc}
0 & R
\end{array} }\right)$QH,

where

A = $\displaystyle \left(\vphantom{
\begin{array}{rrrr}
0.96 - 0.81 i & -0.03 + 0....
...- 0.28 i & 0.20 - 0.12 i & -0.07 + 1.23 i & 0.26 + 0.26 i
\end{array} }\right.$$\displaystyle \begin{array}{rrrr}
0.96 - 0.81 i & -0.03 + 0.96 i & -0.91 + 2.0...
...
1.08 - 0.28 i & 0.20 - 0.12 i & -0.07 + 1.23 i & 0.26 + 0.26 i
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{rrrr}
0.96 - 0.81 i & -0.03 + 0....
...- 0.28 i & 0.20 - 0.12 i & -0.07 + 1.23 i & 0.26 + 0.26 i
\end{array} }\right)$

and

B = $\displaystyle \left(\vphantom{
\begin{array}{rrrr}
1 & 0 & -1 & 0 \\
0 & 1 & 0 & -1
\end{array} }\right.$$\displaystyle \begin{array}{rrrr}
1 & 0 & -1 & 0 \\
0 & 1 & 0 & -1
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{rrrr}
1 & 0 & -1 & 0 \\
0 & 1 & 0 & -1
\end{array} }\right)$,

together with estimates for the condition number of R and the error bound for the computed generalized singular values.

The example program assumes that m$ \ge$n, and would need slight modification if this is not the case.

Example program
Example data
Example results