Re: Bug in Interpolation for multi-d data?

• To: mathgroup at smc.vnet.net
• Subject: [mg86228] Re: Bug in Interpolation for multi-d data?
• From: Andrew Moylan <andrew.j.moylan at gmail.com>
• Date: Thu, 6 Mar 2008 03:00:36 -0500 (EST)
• References: <fq8r74\$jf4\$1@smc.vnet.net>

```Previously: http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread/thread/c29e5cb747116d8/f9148f9d474c4f3d

On Feb 29, 10:44 pm, oshaughn <oshau... at northwestern.edu> wrote:
> Hello,
>
> Interpolation on multi-d data gives different answers depending on the
> order in which the elements are *ordered* in the list.   As far as I
> can tell, this is not documented.
> The sorted element order seems to produce the right results.
>
> Example 1:
> dat = Flatten[
>    Table[{{x, y}, Sin[x] Sin[2 y]}, {x, -3, 3, 0.1}, {y, -3, 3, 0.1}],
>     1];
> dat[[{1, 2, 3}]]
> intp = Interpolation[dat];
> ListPlot3D[Flatten /@ dat]
> Plot3D[intp[x, y], {x, -3, 3}, {y, -3, 3}]
>
> Example 2:
> dat = Flatten[
>    Table[{{x, y}, Sin[x] Sin[2 y]}, {y, -3, 3, 0.1}, {x, -3, 3, 0.1}],
>     1];
> dat[[{1, 2, 3}]]
> intp = Interpolation[dat];
> ListPlot3D[Flatten /@ dat]
> Plot3D[intp[x, y], {x, -3, 3}, {y, -3, 3}]
>
> Example 3:
> dat = Flatten[
>    Table[{{x, y}, Sin[x] Sin[2 y]}, {y, -3, 3, 0.1}, {x, -3, 3, 0.1}],
>     1]//Sort;
> dat[[{1, 2, 3}]]
> intp = Interpolation[dat];
> ListPlot3D[Flatten /@ dat]
> Plot3D[intp[x, y], {x, -3, 3}, {y, -3, 3}]
>
> Am I missing something obvious in the documentation?

```

• Prev by Date: RE: Bold Script Characters in 6.0.2
• Next by Date: Re: Insufficient capacity
• Previous by thread: Re: Bug in Interpolation for multi-d data?