Cubic spline function

Is there a cubic spline function in Julia?

Check out https://github.com/JuliaMath/Interpolations.jl or https://github.com/kbarbary/Dierckx.jl or perhaps even @pyimport scipy.interpolate as itp; itp.interpolate(...) if you have Python/Scipy and PyCall.jl installed.

Do you need it on a regular or irregular grid and in how many dimensions?

# regular and 1D 
thank you very much!!!

https://github.com/JuliaMath/Interpolations.jl/blob/master/README.md#quickstart-guide

Cubic spline on regular grids, and linear ones on regular or irregular grids, are pretty easy to use

1 Like

Hi marius311,

I tried irregular grid with cubic spline in Interpolation.jl, which doesn’t work. So seems Dierckx.jl works better for that?

Min