Is it possible to get coefficients from interpolation function?

I use method ‘interpolate’ from Interpolation.jl library with interpmode=FritschCarlsonMonotonicInterpolation, for example,

y_spline = interpolate(x, y_initial_curve.(x), FritschCarlsonMonotonicInterpolation())

How to get coefficients of all equations or equation expression of interpolation function, like y_spline, if it is possible.
Thank you.

Not familiar with the package but the tests show a function coefficients:

using Interpolations
using Interpolations: coefficients
itp = interpolate(log.(1:0.2:5), BSpline(Linear()))
coefficients(itp)

21-element Vector{Float64}:
 0.0
 0.1823215567939546
 0.3364722366212129
 0.47000362924573563
.....

Is that what you mean?

Thanks a lot, I found the answer in source code. ‘coefficients’ function gives only constant parts of piecewise polynomials. If linear, quadratic and cubic parts of polynomials are needed to get, ‘itp.m’, ‘itp.c’, ‘itp.d’ should be written, respectively.

You can press the Solution tickbox for your own answer to let everybody know it’s solved :slight_smile: