I'm using interpolation package to fit some data with a predefined amount of cubic splines. However, the function spline1dfit(...) uses so-called natural boundary conditions in this problem, i.e. S''=0 on boundaries.
In my task I want to use this fitted region of a function with other functions on its edges. So, for example, I fit a [x1, x2] region with f1(x), [x2, x3] with splines, and [x3, x4] with f2(x). I know exactly the values and the derivatives of f1(x) and f2(x) on those points, so I wonder, if I should somehow try to implement exact boundary conditions on the fitting procedure, or may be I should switch to interpolation instead.
Thanks
|