Example program for dgelsd
This example solves the linear least squares problem
min
x
b
-
A
x
2
for the solution,
x
, of minimum norm, where
A
=
-
0.09
-
1.56
-
1.48
-
1.09
0.08
-
1.59
0.14
0.20
-
0.43
0.84
0.55
-
0.72
-
0.46
0.29
0.89
0.77
-
1.13
1.06
0.68
1.09
-
0.71
2.11
0.14
1.24
1.29
0.51
-
0.96
-
1.27
1.74
0.34
and
b
=
7.4
4.3
-
8.1
1.8
8.7
.
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