I would like to interpolate the following function
g[z_, e_] :=
PDF[TruncatedDistribution[{e - 2, e + 2},
NormalDistribution[e, 0.3]], z]
a1 = N[g[-2, 0]];
a2 = N[g[-1, 0]];
a3 = N[g[0, 0]];
a4 = N[g[1, 0]];
a5 = N[g[2, 0]];
With your help I am now using:
k[x_, e_] =
Interpolation[{{-2 + e, a1}, {-1 + e, a2}, {0 + e,
a3}, {1 + e, a4}, {2 + e, a5}},
Method -> "Spline"] [x];
I need e as an variable, which I can easily access. Can i somehow get rid of the error shown in the picture?
Or do I have to stick to InterpolatingPolynomial? Can i somehow abuse InterpolatingFunction?
Why do i get negative values in the approximation function? Can i get rif of them with other, better methods?

Interpolation[data, Method -> "Spline"]? – vapor Mar 13 '17 at 11:47BSplineFunctionwith explicit parameters, what else do you want? – vapor Mar 13 '17 at 12:24e? You can numerically differentiate: http://i.stack.imgur.com/bxKjR.png – Michael E2 Mar 13 '17 at 12:34kneeds to be set delayed:k[x_, e_] := .... For good measure you might want to dok[x_, e_?NumericQ] := ...– george2079 Mar 13 '17 at 14:05FunctionInterpolation, or setInterpolationOrder->1– george2079 Mar 13 '17 at 15:18PDF[TruncatedDistribution[{e - 2, e + 2}, NormalDistribution[e, 3/10]], z]or byPDF[TruncatedDistribution[{e - 2, e + 2}, NormalDistribution[e, 0.3]], z]? – Michael E2 Mar 17 '17 at 22:49