DGGSVD 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)$QT,  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)$QT,

where

A = $\displaystyle \left(\vphantom{
\begin{array}{ccc}
1 & 2 & 3 \\
3 & 2 & 1 \\
4 & 5 & 6 \\
7 & 8 & 8
\end{array} }\right.$$\displaystyle \begin{array}{ccc}
1 & 2 & 3 \\
3 & 2 & 1 \\
4 & 5 & 6 \\
7 & 8 & 8
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{ccc}
1 & 2 & 3 \\
3 & 2 & 1 \\
4 & 5 & 6 \\
7 & 8 & 8
\end{array} }\right)$  and  B = $\displaystyle \left(\vphantom{
\begin{array}{ccc}
-2 & -3 & 3 \\
4 & 6 & 5
\end{array} }\right.$$\displaystyle \begin{array}{ccc}
-2 & -3 & 3 \\
4 & 6 & 5
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{ccc}
-2 & -3 & 3 \\
4 & 6 & 5
\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