nag_1d_spline_fit_knots (e02bac) Example Program Results

Number of distinct knots = 6

Distinct knots located at 

  0.2000   1.5000   2.6000   4.0000   8.0000  12.0000


    J    B-spline coeff c

    1        -0.0465
    2         3.6150
    3         8.5724
    4         9.4261
    5         7.2716
    6         4.1207
    7         3.0822
    8         2.5597

Residual sum of squares =    1.78e-03

Cubic spline approximation and residuals
  r        Abscissa        Weight       Ordinate          Spline      Residual

  1         0.2000         0.2000         0.0000         -0.0465      -4.7e-02
            0.3350                                        1.0622
  2         0.4700         0.2000         2.0000          2.1057       1.1e-01
            0.6050                                        3.0817
  3         0.7400         0.3000         4.0000          3.9880      -1.2e-02
            0.9150                                        5.0558
  4         1.0900         0.7000         6.0000          5.9983      -1.7e-03
            1.3450                                        7.1376
  5         1.6000         0.9000         8.0000          7.9872      -1.3e-02
            1.7500                                        8.3544
  6         1.9000         1.0000         8.6200          8.6348       1.5e-02
            2.2500                                        9.0076
  7         2.6000         1.0000         9.1000          9.0896      -1.0e-02
            2.8500                                        9.0353
  8         3.1000         1.0000         8.9000          8.9125       1.2e-02
            3.5500                                        8.5660
  9         4.0000         0.8000         8.1500          8.1321      -1.8e-02
            4.5750                                        7.5592
 10         5.1500         0.5000         7.0000          6.9925      -7.5e-03
            5.6600                                        6.5010
 11         6.1700         0.7000         6.0000          6.0255       2.6e-02
            7.0850                                        5.2292
 12         8.0000         1.0000         4.5400          4.5315      -8.5e-03
            9.0000                                        3.9045
 13        10.0000         1.0000         3.3900          3.3928       2.8e-03
           11.0000                                        2.9574
 14        12.0000         1.0000         2.5600          2.5597      -3.5e-04