Example program for dgeqlf
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.57
-
1.28
-
0.39
0.25
-
1.93
1.08
-
0.31
-
2.14
2.30
0.24
0.40
-
0.35
-
1.93
0.64
-
0.66
0.08
0.15
0.30
0.15
-
2.13
-
0.02
1.03
-
1.43
0.50
and
B
=
-
2.67
0.41
-
0.55
-
3.10
3.34
-
4.01
-
0.77
2.76
0.48
-
6.17
4.10
0.21
.
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