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"]
? $\endgroup$BSplineFunction
with explicit parameters, what else do you want? $\endgroup$FunctionInterpolation
, or setInterpolationOrder->1
$\endgroup$