[SciPy-User] interp1d results vs. MatLab interp1
Pauli Virtanen
pav at iki.fi
Mon Nov 21 11:53:09 EST 2011
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.
--
Pauli Virtanen
More information about the SciPy-User
mailing list