ZGELSD 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}{rrrrrr}
0.47 - 0.34 i & -0.32 - ...
... 0.17 i & -0.34 - 0.09 i & 1.14 - 0.78 i &
0.07 + 1.14 i
\end{array} }\right.$$\displaystyle \begin{array}{rrrrrr}
0.47 - 0.34 i & -0.32 - 0.23 i & 0.35 - 0....
...& -0.43 + 0.17 i & -0.34 - 0.09 i & 1.14 - 0.78 i &
0.07 + 1.14 i
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{rrrrrr}
0.47 - 0.34 i & -0.32 - ...
... 0.17 i & -0.34 - 0.09 i & 1.14 - 0.78 i &
0.07 + 1.14 i
\end{array} }\right)$

and

b = $\displaystyle \left(\vphantom{
\begin{array}{r}
2.15 - 0.20 i \\
-2.24 + 1.82 i \\
4.45 - 4.28 i \\
5.70 - 6.25 i
\end{array} }\right.$$\displaystyle \begin{array}{r}
2.15 - 0.20 i \\
-2.24 + 1.82 i \\
4.45 - 4.28 i \\
5.70 - 6.25 i
\end{array}$$\displaystyle \left.\vphantom{
\begin{array}{r}
2.15 - 0.20 i \\
-2.24 + 1.82 i \\
4.45 - 4.28 i \\
5.70 - 6.25 i
\end{array} }\right)$.

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

Example program
Example data
Example results