Consider following series of functions
Do[f[k][w_] = Exp[-(w-Sin[k])^2], {k, 10}]
depicted as
Let us tabulate and interpolate them
fdata = Flatten[Table[{w, k, f[k][w]}, {w, -3, 3, 0.1}, {k, 10}], 1];
g = Interpolation[fdata];
Instead of a smooth function some irregularities appear:
ListPlot3D[fdata]
as shown here
Let us zoom in
Plot[
Evaluate[{g[w, 1], g[w, 1.5], g[w, 2]}], {w, -2, 3},
PlotStyle -> {Black,Red,Black},Axes -> False,Frame->True]
The red curve should look similar to 2 black ones and have a peak somewhere in the middle. Instead, due to the 2d interpolation a much larger peak at wrong location arises.
My question therefore would be: is there a way to do such interpolation in mathematica properly?