Re: Interpolation does not quite interpolate
- To: mathgroup at smc.vnet.net
- Subject: [mg81867] Re: [mg81822] Interpolation does not quite interpolate
- From: DrMajorBob <drmajorbob at bigfoot.com>
- Date: Fri, 5 Oct 2007 04:52:48 -0400 (EDT)
- References: <9715140.1191541757741.JavaMail.root@m35>
- Reply-to: drmajorbob at bigfoot.com
That's a HUGE bug.
What's the world coming to?
Bobby
On Thu, 04 Oct 2007 03:24:43 -0500, Neil Stewart
<neil.stewart at warwick.ac.uk> wrote:
> I'm having trouble with Interpolation[]. With InterpolationOrder->0,
> Interpolation[] returns a function that fails to "agree with data at
> every
> point" as promised in the manual. When InterpolationOrder->1 or higher,
> the problem disappears.
>
> Here is an example. Notice that although the point {1,1} is specified
> f[1] =
> 2.
>
> In[1]:= f = Interpolation[{{1, 1}, {2, 2}, {3, 3}}, InterpolationOrder
> -> 0]
> Out[1]= InterpolatingFunction[{{1, 3}}, <>]
>
> In[2]:= f[1]
> Out[2]= 2 (* f[1] should be 1 *)
>
> In[3]:= f[2]
> Out[3]= 2
>
> In[4]:= f[3]
> Out[4]= 3
>
> In[5]:= g = Interpolation[{{1, 1}, {2, 2}, {3, 3}}, InterpolationOrder
> -> 1]
> Out[5]= InterpolatingFunction[{{1, 3}}, <>]
>
> In[6]:= g[1]
> Out[6]= 1 (* f[1] is 1 now *)
>
> In[7]:= g[2]
> Out[7]= 2
>
> In[8]:= g[3]
> Out[8]= 3
>
> Is this a bug? Can anyone help?
>
> Thanks,
> Neil
>
>
>
--
DrMajorBob at bigfoot.com