[SciPy-User] interp1d results vs. MatLab interp1
Charles R Harris
Mon Nov 21 13:39:58 CST 2011
On Mon, Nov 21, 2011 at 11:28 AM, Pauli Virtanen <email@example.com> wrote:
> 21.11.2011 19:13, Charles R Harris kirjoitti:
> > The boundary conditions can make a difference. I expect, given De Boor's
> > participation, that the Matlab spline uses not-a-knot boundary
> > conditions when no other boundary conditions are specified. I'm not sure
> > what interp1d does.
> It's not only the boundary conditions: you can also make a choice
> whether you want C2 contiguity, or if you stick with C1 which gives you
> more freedom to play around with other things such as monotonicity.
Is that an option in interp1d? That is usually done for b-splines by using
repeated knot points. When the knot points are isolated then the spline and
all derivatives except the last non-zero one are continuous. Each repeat of
the knot point drops the number of continuity conditions by one, so that
in the cubic spline case a knot point repeated four times allows the spline
to be discontinuous at that point, whereas zero knot points, i.e., between
knot points, requires continuity to all orders.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User