DGGGLM Example

To solve the weighted least squares problem

$\displaystyle \min_{{x}}^{}$$\displaystyle \left\Vert\vphantom{ B^{-1} (d - A x) }\right.$B-1(d - Ax)$\displaystyle \left.\vphantom{ B^{-1} (d - A x) }\right\Vert _{{2}}^{}$

where

A = $\displaystyle \left(\vphantom{
\begin{array}{rrr}
-0.57 & -1.28 & -0.39 \\
...
...0.31 \\
2.30 & 0.24 & -0.40 \\
-0.02 & 1.03 & -1.43
\end{array} }\right.$$\displaystyle \begin{array}{rrr}
-0.57 & -1.28 & -0.39 \\
-1.93 & 1.08 & -0.31 \\
2.30 & 0.24 & -0.40 \\
-0.02 & 1.03 & -1.43
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{rrr}
-0.57 & -1.28 & -0.39 \\
...
...0.31 \\
2.30 & 0.24 & -0.40 \\
-0.02 & 1.03 & -1.43
\end{array} }\right)$B = $\displaystyle \left(\vphantom{
\begin{array}{cccc}
0.5 & 0 & 0 & 0 \\
0 & 1.0 & 0 & 0 \\
0 & 0 & 2.0 & 0 \\
0 & 0 & 0 & 5.0
\end{array} }\right.$$\displaystyle \begin{array}{cccc}
0.5 & 0 & 0 & 0 \\
0 & 1.0 & 0 & 0 \\
0 & 0 & 2.0 & 0 \\
0 & 0 & 0 & 5.0
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{cccc}
0.5 & 0 & 0 & 0 \\
0 & 1.0 & 0 & 0 \\
0 & 0 & 2.0 & 0 \\
0 & 0 & 0 & 5.0
\end{array} }\right)$  and  d = $\displaystyle \left(\vphantom{
\begin{array}{r}
1.32 \\
-4.00 \\
5.52 \\
3.24
\end{array} }\right.$$\displaystyle \begin{array}{r}
1.32 \\
-4.00 \\
5.52 \\
3.24
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{r}
1.32 \\
-4.00 \\
5.52 \\
3.24
\end{array} }\right)$.

Example program
Example data
Example results