Algorithm 5.2.1 (Conjugate Gradient Method for solving LSE with p.d. matrix)
A= [16.0 4.0 8.0 4.0] [ 4.0 10.0 8.0 4.0] [ 8.0 8.0 12.0 10.0] [ 4.0 4.0 10.0 12.0] b= (32.0, 26.0, 38.0, 30.0) x= (1.0, 1.0, 1.0, 1.0) ||r||= 4.63185045874e-13 exact solution= (1.0, 1.0, 1.0, 1.0) 4 A= [16.0 4.0 8.0 4.0] [ 4.0 10.0 8.0 4.0] [ 8.0 8.0 12.0 10.0] [ 4.0 4.0 10.0 12.0] b= (32.0, 26.0, 38.0, 30.0) x= (1.0, 1.0, 1.0, 1.0) ||r||= 4.63185045874e-13 exact solution= (1.0, 1.0, 1.0, 1.0) 4 |
Algorithm 5.1.1 (Steepest Descent Method for solving LSE with p.d. matrix)
A= [16.0 4.0 8.0 4.0] [ 4.0 10.0 8.0 4.0] [ 8.0 8.0 12.0 10.0] [ 4.0 4.0 10.0 12.0] b= (32.0, 26.0, 38.0, 30.0) x= (0.999999990799, 0.999999981379, 1.00000003886, 0.999999976071) ||r||= 9.81033920766e-09 exact solution= (1.0, 1.0, 1.0, 1.0) 1064 A= [16.0 4.0 8.0 4.0] [ 4.0 10.0 8.0 4.0] [ 8.0 8.0 12.0 10.0] [ 4.0 4.0 10.0 12.0] b= (32.0, 26.0, 38.0, 30.0) x= (0.999999990799, 0.999999981379, 1.00000003886, 0.999999976071) ||r||= 9.81033920766e-09 exact solution= (1.0, 1.0, 1.0, 1.0) 1064 |
|