I have an InterpolatededFunction func and want to get some of its properties, namely:
- Domain, Order, Method as shown in the output of func by clicking the plus-Button.
- The functions pieces which are polynomials.
- The value-range of the function within the domain.
I tried many things but did not succeed. The reason behind my problem is a complex plotting function that gets a function and a domain (= x-PlotRange), plots the function and many other things by Prolog and Epilog. I need a reasonable y-Plotrange which has at least to include the functions FunctionRange. Of course, I can use FindMaximum and FindMinimum, but its not so easy to get reasonable iteration starting points. Everything would be easier and faster if I had the information mentioned above.
Here is an example:
Block[{xs = {-2, 0, 1, 3, 4, 7}, ys = {0, 1, 3, 7, 2, -1}, data, xS,
xE, func, order = Automatic, method = "Spline"},
xS = Min[xs]; xE = Max[xs];
data = Thread[{xs, ys}];
func = Interpolation[data, InterpolationOrder -> order,
Method -> method];
Print[Column[{
{xS, xE},
data,
{order, method},
func,
Plot[func[x], {x, xS, xE},
Epilog -> {PointSize[Medium], Point[data]},
AxesOrigin -> {0, 0}, ImageSize -> Small],
Properties[func],
FunctionRange[{func[x], xS <= x <= xE}, x, y]
}]];
];


