Example program for zgeqpf
This example solves the linear least squares problems
minimize
A
x
i
-
b
i
2
,
i
=
1
,
2
where
b
1
and
b
2
are the columns of the matrix
B
,
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
=
-
0.85
-
1.63
i
2.49
+
4.01
i
-
2.16
+
3.52
i
-
0.14
+
7.98
i
4.57
-
5.71
i
8.36
-
0.28
i
6.38
-
7.40
i
-
3.55
+
1.29
i
8.41
+
9.39
i
-
6.72
+
5.03
i
.
Here
A
is approximately rank-deficient, and hence it is preferable to use
zgeqpf
rather than
zgeqrf
.
f90 source code
Input data file
Expected results