Example program for zgeqlf
This example solves the linear least squares problems
min
x
b
j
-
A
x
j
2
,
j
=
1
,
2
for
x
1
and
x
2
, where
b
j
is the
j
th column of the matrix
B
,
A
=
0.96
-
0.81
i
-
0.03
+
0.96
i
-
0.91
+
2.06
i
-
0.05
+
0.41
i
-
0.98
+
1.98
i
-
1.20
+
0.19
i
-
0.66
+
0.42
i
-
0.81
+
0.56
i
0.62
-
0.46
i
1.01
+
0.02
i
0.63
-
0.17
i
-
1.11
+
0.60
i
-
0.37
+
0.38
i
0.19
-
0.54
i
-
0.98
-
0.36
i
0.22
-
0.20
i
0.83
+
0.51
i
0.20
+
0.01
i
-
0.17
-
0.46
i
1.47
+
1.59
i
1.08
-
0.28
i
0.20
-
0.12
i
-
0.07
+
1.23
i
0.26
+
0.26
i
and
B
=
-
2.09
+
1.93
i
3.26
-
2.70
i
3.34
-
3.53
i
-
6.22
+
1.16
i
-
4.94
-
2.04
i
7.94
-
3.13
i
0.17
+
4.23
i
1.04
-
4.26
i
-
5.19
+
3.63
i
-
2.31
-
2.12
i
0.98
+
2.53
i
-
1.39
-
4.05
i
.
The solution is obtained by first obtaining a
Q
L
factorization of the matrix
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