I am trying to create the interpolating function for a function of two variables, over a finite area. Just for consistency we can think of a function:
MyFunc[a_,b_]:=Sin[a*b]/Sqrt[1+a^2+b^2]
I've read the documentation and, in order to get the interpolating function I use:
MyTable=Table[MyFunc[a,b],{a, -5, 5, 0.1}, {b, -5, 5, 0.1}]
MyApproximateFunc = ListInterpolation[MyTable]
this seem to work, but when I try to plot MyFunc and MyApproximateFunc they look very different: I must have missed some detail...
Plot3D[MyFunc[a, b], {a, -5, 5}, {b, -5, 5}]
Plot3D[MyApproximateFunc[a, b], {a, -5, 5}, {b, -5, 5}]
Thanks in advance for your kind help!


ListInterpolation[]supports a domain specification; tryMyApproximateFunc = ListInterpolation[MyTable, {{-5, 5}, {-5, 5}}]. – J. M.♦ Nov 5 '12 at 17:40