MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Interpolation in 2 D, bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83810] Interpolation in 2 D, bug?
  • From: Hugh <h.g.d.goyder at cranfield.ac.uk>
  • Date: Sat, 1 Dec 2007 05:42:23 -0500 (EST)

I either need something explaining to me or there is a bug in
Interpolation.
I take the data below and make an interpolation function. When I put
the x, y values back into the function I don't get the values of the
original data but some transpose of them. Am I doing something wrong
or is this a bug?

Hugh Goyder


In[1]:= $Version

Out[1]= "6.0 for Microsoft Windows (32-bit) (June 19, 2007)"

In[2]:= data = {
   {{-1, 0}, 0}, {{-1, -1}, -1}, {{-1, -2}, -2}, {{-1, -3}, -3},
   {{0, 0}, -2}, {{0, -1}, -3}, {{0, -2}, -4}, {{0, -3}, -5},
   {{1, 0}, -4}, {{1, -1}, -6}, {{1, -2}, -8}, {{1, -3}, -9}};

In[3]:= f = Interpolation[data, InterpolationOrder -> {2, 3}];

In[4]:= f[-1, 0]

Out[4]= -3

In[5]:= f[-1, -1]

Out[5]= -2

In[6]:= f[-1, -2]

Out[6]= -1

In[7]:= f[-1, -3]

Out[7]= 0

In[8]:= f[0, 0]

Out[8]= -5

In[9]:= f[0, -1]

Out[9]= -4

In[10]:= f[0, -2]

Out[10]= -3

In[11]:= f[0, -3]

Out[11]= -2

In[12]:= f[1, 0]

Out[12]= -9

In[13]:= f[1, -1]

Out[13]= -8

In[14]:= f[1, -2]

Out[14]= -6

In[15]:= f[1, -3]

Out[15]= -4


  • Prev by Date: Re: A problem with FindRoot
  • Next by Date: Re: Bug in SphericalPlot3D?
  • Previous by thread: Re: A problem with FindRoot
  • Next by thread: Re: Interpolation in 2 D, bug?