The best solution for this sort of thing is generally *?plots/surfdata *, except that requires that you already have data for a uniform grid of points, and your data is not in a uniform grid. So you'll need to fit your data to a surface first. And frankly, the arrangement of data that you show here is not going to be enough to get a very useful fit in between the data points that are given. But maybe you have more data that would just be too voluminous to post? Let's have a look at the options at any rate.

The usual suspects for constructing such a fit are to be found in the ?CurveFitting package, but here most procedures either again require data for a uniform grid of points, or they accept only one-dimensional input data whereas you have 2D input. Another option would be the ?Statistics/Regression subpackage. That provides two functions that could be useful here: ?Statistics/LinearFit and ?Statistics/NonlinearFit. Both can fit a nonlinear expression to data; the first command requires that that expression is linear in the *parameters* that are to be fitted but provides globally optimal results, the second command is more widely applicable but provides only locally optimal results. The ?Statistics/Fit command provides a way to let Maple choose which of the two commands is appropriate.

A final option, one that could be considered nonparametric, is to use a kernel density fit. Again, Maple has a facility for that (?Statistics/KernelDensity), but it only allows for 1D input / 1D output data. But this would maybe be useful to construct ourselves. Essentially what want to do then, is: given *x*- and *y*-coordinates, take a weighted average of the *c*-values corresponding to our input points, where the weight for *c*_{i} depends on the vector (*x* - *a*_{i}, *y* - *b*_{i}). We'll do that as follows:

a := <.19375, .19494, .19581, .19632, .19646, .19624, .19565, .19472, .19349, .19198, .19024, .18833>;

b := <-0.1517e-1, -0.1515e-1, -0.1512e-1, -0.1509e-1, -0.1506e-1, -0.1503e-1, -0.15e-1, -0.1497e-1, -0.1495e-1, -0.1492e-1, -0.1491e-1, -0.149e-1>;

c := <0.112346e-10, 0.111963e-10, 0.111544e-10, 0.111101e-10, 0.110649e-10, 0.110201e-10, 0.10977e-10, 0.10937e-10, 0.109011e-10, 0.108705e-10, 0.108458e-10, 0.108277e-10>;

kdFit := proc(xdata, ydata, zdata)

local xradius, yradius;

xradius := (max - min)(xdata);

yradius := (max - min)(ydata);

return proc(x, y)

local d, values;

values := zip((xx, yy) -> exp(- 10 * (xx^2 + yy^2)), (xdata -~ x) / xradius, (ydata -~ y) / yradius);

return (values . zdata) / add(d, d in values);

end proc;

end proc;

ourFit := kdFit(a, b, c);

p1 := plots[contourplot3d](ourFit, min(a) .. max(a), min(b) .. max(b), axes=boxed, style=surfacecontour);

p2 := plots[pointplot3d](a, b, c, color=black, symbolsize=25);

plots[display](p1, p2);

Instead of the 3D contour plot that I plotted here, you can also create a regular, 'flat', contour plot by using plots[contourplot] - in which case you're probably less interested in the points, so you just need *p1*.

Hope this helps,

Erik Postma

Maplesoft.

Edit: had a typo in the code - fixed now.