MathGroup Archive 2008

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

Search the Archive

Re: Interpolation with vectors

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84699] Re: Interpolation with vectors
  • From: nigol <dario.buttari at gmail.com>
  • Date: Thu, 10 Jan 2008 02:28:50 -0500 (EST)
  • References: <flvnjk$7ck$1@smc.vnet.net>

Daniel,
I think the documentation is wrong or the function implementation is wrong.
In mathematica 6.0.1 the correct syntax for your example seems to be:

In[1]:= Interpolation[{{1, {{1, 1}}}, {2, {{1, 2}}}},
  InterpolationOrder -> 1][1.5]

Out[1]= {1, 1.5}

Your original syntax is interpreted as equivalent to:

In[3]:= Interpolation[{{{1}, 1, 1}, {{2}, 1, 2}},
  InterpolationOrder -> 1][1.5]

Out[3]= 0.875

In that syntax the two numbers following the x location specify f1 and
df1 (derivative of the function at the interpolation point).

You can plot:

Plot[Interpolation[{{1, {1, 1}}, {2, {1, 2}}},
   InterpolationOrder -> 1][x], {x, 1, 2}]

to understand what is going on.
Dario


  • Prev by Date: Re: Prime Number Calculation
  • Next by Date: Re: How to ParametricPlot3D a plane given Normal and Distance
  • Previous by thread: Interpolation with vectors
  • Next by thread: Re: Interpolation with vectors