Re: suggestions?
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg554] Re: [mg549] suggestions?
- From: el at qua.crl.melco.co.jp (E. Lange)
- Date: Thu, 16 Mar 95 14:22:53 JST
> There is a rectangular plot of land, several acres in size, which is > contaminated by a single hazardous waste. We have some chemical > measurements of the concentation of the waste in the soils at N randomly > spaced points -- these points are NOT on a grid. > > From other information about the deposition of the waste, we know that the > function > > concentration( x, y ) > > is well behaved and smoothly varying..... > > So, I want to use a 2D InterpolationFunction in Mma to model the You might try a simple interpolation using radial basis functions: data = Table[Random[], {10}, {3}] c = 5 Transpose[data][[3]] . # / Plus @@ # & [ E^(-c^2((x-#[[1]])^2 + (y-#[[2]])^2))& /@ data ] Plot3D[%, {x, 0, 1}, {y, 0, 1}] The parameter c adjusts the `stiffness' of the interpolation. For c = 0, the interpolation result is the average concentration of the waste. For c-->Infinity, the interpolation result is the concentration at the closest measurement point. You can also try to use other basis functions, such as 1/d^c instead of E^(-c^2 d), or incorporate knowledge about the physics of the problem. In readable notation: InterpolationRBF[data_, c_][x_, y_] := Module[{radial}, radial = Table[ E^(-c^2 ( (x - data[[i, 1]])^2 + (y - data[[i, 2]])^2) ), {i, Length[data]} ]; Transpose[data][[3]] . radial / Apply[Plus, radial] ] f = InterpolationRBF[data, c]; Show[ Plot3D[f[x, y], {x, 0, 1}, {y, 0, 1}], Graphics3D[Point /@ data] ] Eberhard Lange