Example program for dgels
This example solves the linear least squares problem
min
x
b
-
A
x
2
,
where
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.55
3.34
-
0.77
0.48
4.10
.
The square root of the residual sum of squares is also output.
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