Example program for zgelss
This example solves the linear least squares problem
min
x
b
-
A
x
2
for the solution,
x
, of minimum norm, where
A
=
0.47
-
0.34
i
-
0.40
+
0.54
i
0.60
+
0.01
i
0.80
-
1.02
i
-
0.32
-
0.23
i
-
0.05
+
0.20
i
-
0.26
-
0.44
i
-
0.43
+
0.17
i
0.35
-
0.60
i
-
0.52
-
0.34
i
0.87
-
0.11
i
-
0.34
-
0.09
i
0.89
+
0.71
i
-
0.45
-
0.45
i
-
0.02
-
0.57
i
1.14
-
0.78
i
-
0.19
+
0.06
i
0.11
-
0.85
i
1.44
+
0.80
i
0.07
+
1.14
i
and
b
=
-
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
.
A tolerance of
0.01
is used to determine the effective rank of
A
.
Note that the block size (NB) of
64
assumed in this example is not realistic for such a small problem, but should be suitable for large problems.
f90 source code
Input data file
Expected results