# Understanding the structure of an InterpolatingFunction [duplicate]

FunctionInterpolation[x^2, {x, 0, 9}] // InputForm


returns:

InterpolatingFunction[
{{0., 9.}},
{5, 3, 0, {13}, {4}, 0, 0, 0, 0, Automatic, {}, {}, False},
{{0., 0.75, 1.5, 2.25, 3., 3.75, 4.5, 5.25, 6., 6.75, 7.5, 8.25, 9.}},
{{0.}, {0.5625}, {2.25}, {5.0625}, {9.}, {14.0625}, {20.25}, {27.5625}, {36.},
{45.5625}, {56.25}, {68.0625}, {81.}},
{Automatic}]


Some of the lists can easily be understood: first line is the Domain, third line is the list of x coordinates of the interpolating points, fourth line is the list of their y coordinates (why in List of List?).

I'd like to understand more precisely the structure to modify it manually (more precisely, I'd like to define an interpolating function by "cropping" the InterpolatingFunction on a smaller domain, without changing the points in the interval of interest--this last condition was not included in my previous question How to restrict InterpolatingFunction to a smaller domain?).

This would allow me to see for example what's wrong in the following, which I made from another huge interpolating function but is not recognized as a packed InterpolatingFunction (it does not return the nice form).

InterpolatingFunction[{{-14.7299, -14.6565}}, {5, 7, 1, {3}, {4}, 0,
0, 0, 0, Automatic, {}, {},
False}, {{-211.618, -211.576, -211.481}}, \
{DeveloperPackedArrayForm, {0, 2, 4}, {20.9957, 0.784718, 21.0292,
0.782668, 21.1027, 0.777747}}, {Automatic}]

• Have you seen mathematica.stackexchange.com/questions/28337/… (but it's not the full story - there are many types of IFs) – Michael E2 Nov 14 '16 at 0:50
• @MichaelE2 No I had not, thank you. I'll read it and either answer, delete or edit my question. – anderstood Nov 14 '16 at 1:03
• BTW, if you change {0,2,4} to {0, 2, 4, 6}, the last example works. It's a list of indices of where to split the array of values that follows it. The indices need to start with 0 and end with the length of the array. – Michael E2 Nov 14 '16 at 1:47
• @MichaelE2 Thank you!! That was my problem; I had tried with $n+1$ elements but had not started with 0. I wrapped all that in a cropInterpolatingFunction which I will share here soon. – anderstood Nov 14 '16 at 3:50
• Glad it was so easy. I think I described the parts of a DeveloperPackedArrayForm IF in a little more detail here. (Well, at least there's a little comment for more of the pieces.) – Michael E2 Nov 14 '16 at 11:08