DGGLSE Example

To solve the linear equality constrained least squares problem

$\displaystyle \min_{{x}}^{}$$\displaystyle \left\Vert\vphantom{ c - A x }\right.$c - Ax$\displaystyle \left.\vphantom{ c - A x }\right\Vert _{{2}}^{}$  subject to  Bx = d

where

A = $\displaystyle \left(\vphantom{
\begin{array}{rrrr}
-0.57 & -1.28 & -0.39 & 0....
...5 & 0.30 & 0.15 & -2.13 \\
-0.02 & 1.03 & -1.43 & 0.50
\end{array} }\right.$$\displaystyle \begin{array}{rrrr}
-0.57 & -1.28 & -0.39 & 0.25 \\
-1.93 & 1...
...\\
0.15 & 0.30 & 0.15 & -2.13 \\
-0.02 & 1.03 & -1.43 & 0.50
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{rrrr}
-0.57 & -1.28 & -0.39 & 0....
...5 & 0.30 & 0.15 & -2.13 \\
-0.02 & 1.03 & -1.43 & 0.50
\end{array} }\right)$B = $\displaystyle \left(\vphantom{
\begin{array}{cccc}
1 & 0 & -1 & 0 \\
0 & 1 & 0 & -1
\end{array} }\right.$$\displaystyle \begin{array}{cccc}
1 & 0 & -1 & 0 \\
0 & 1 & 0 & -1
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{cccc}
1 & 0 & -1 & 0 \\
0 & 1 & 0 & -1
\end{array} }\right)$,

c = $\displaystyle \left(\vphantom{
\begin{array}{r}
-1.50 \\
-2.14 \\
1.23 \\
-0.54 \\
-1.68 \\
0.82
\end{array} }\right.$$\displaystyle \begin{array}{r}
-1.50 \\
-2.14 \\
1.23 \\
-0.54 \\
-1.68 \\
0.82
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{r}
-1.50 \\
-2.14 \\
1.23 \\
-0.54 \\
-1.68 \\
0.82
\end{array} }\right)$  and  d = $\displaystyle \left(\vphantom{
\begin{array}{r}
0 \\
0
\end{array} }\right.$$\displaystyle \begin{array}{r}
0 \\
0
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{r}
0 \\
0
\end{array} }\right)$.

The constraints Bx = d correspond to x1 = x3 and x2 = x4.

Example program
Example data
Example results