ZGELSS Example

To solve the linear least squares problem

$\displaystyle \min_{{x}}^{}$$\displaystyle \left\Vert\vphantom{ b - A x }\right.$b - Ax$\displaystyle \left.\vphantom{ b - A x }\right\Vert _{{2}}^{}$

for the solution, x, of minimum norm, where

A = $\displaystyle \left(\vphantom{
\begin{array}{rrrr}
0.47 - 0.34 i & -0.40 + 0....
... + 0.06 i & 0.11 - 0.85 i & 1.44 + 0.80 i & 0.07 + 1.14 i
\end{array} }\right.$$\displaystyle \begin{array}{rrrr}
0.47 - 0.34 i & -0.40 + 0.54 i & 0.60 + 0.01...
...
-0.19 + 0.06 i & 0.11 - 0.85 i & 1.44 + 0.80 i & 0.07 + 1.14 i
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{rrrr}
0.47 - 0.34 i & -0.40 + 0....
... + 0.06 i & 0.11 - 0.85 i & 1.44 + 0.80 i & 0.07 + 1.14 i
\end{array} }\right)$

and

b = $\displaystyle \left(\vphantom{
\begin{array}{r}
-1.08 - 2.59 i \\
-2.61 - ...
...
3.13 - 3.61 i \\
7.33 - 8.01 i \\
9.12 + 7.63 i
\end{array} }\right.$$\displaystyle \begin{array}{r}
-1.08 - 2.59 i \\
-2.61 - 1.49 i \\
3.13 - 3.61 i \\
7.33 - 8.01 i \\
9.12 + 7.63 i
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{r}
-1.08 - 2.59 i \\
-2.61 - ...
...
3.13 - 3.61 i \\
7.33 - 8.01 i \\
9.12 + 7.63 i
\end{array} }\right)$.

A tolerance of 0.01 is used to determine the effective rank of A.

Example program
Example data
Example results