I have a list of input pairs {xa,ya} and a list of output pairs {x,y}. For example:
p = {
{{1, 1}, {1, 1}},
{{1, 2}, {1, 4}},
{{2, 1}, {4, 1}},
{{2, 2}, {4, 4}},
{{1, 3}, {1, 9}},
{{2, 3}, {4, 9}},
{{3, 1}, {9, 1}},
{{3, 2}, {9, 4}},
{{3, 3}, {9, 9}}
}
which, for a given {xa,ya} gives {xa^2,ya^2}.
f = Interpolation[p]
works fine, f[2.5,2.5]={6.25,6.25}, but if I add RandomReal[.1, {9, 2, 2}] to p:
pp=p+RandomReal[ 0.1 , {9, 2, 2} ]
it becomes an unstructured grid, and Interpolation won't work.
I think ListInterpolation[ ] using pp will give me what I want, but I have no idea how to construct an interpolation function f from ListInterpolation such that
f[xa,ya] will give me roughly {xa^2,ya^2}.
Does anyone know how to do this?