[SciPy-User] interp1d results vs. MatLab interp1
Charles R Harris
Mon Nov 21 12:13:58 CST 2011
On Mon, Nov 21, 2011 at 9:53 AM, Pauli Virtanen <firstname.lastname@example.org> wrote:
> 21.11.2011 17:29, Lynn Oliver kirjoitti:
> > I'm converting a MatLab program to Python, and I'm having problems
> > understanding why scipy.interpolate.interp1d is giving different results
> > than MatLab interp1.
> With cubic splines, there is freedom in choosing the interpolants, so
> there are many different "cubic" spline interpolation schemes.
> Matlab's interp1's 'cubic' mode apparently produces a C1 continuous
> spline that is monotonicity-preserving. I don't think such a mode is
> currently implemented in Scipy.
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User