Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1993
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1993

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

Search the Archive

D and InterpolatingFunction again

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: D and InterpolatingFunction again
  • From: Pekka.Janhunen at fmi.fi
  • Date: Wed, 23 Jun 1993 08:50:53 -0800

I asked,

        > How does D handle interpolating functions? This would be
        > extremely useful, but I haven't been able to find out how.

and Jerry Keiper replied:

>In[2]:= f = Interpolation[Table[{x, Sin[x]}, {x, 0., 5., .1}]]
>
>Out[2]= InterpolatingFunction[{0., 5.}, <>]
>
>In[3]:= D[f[x], x]
>
>Out[3]= InterpolatingFunction[{0., 5.}, <>][x]

That's nice, but actually I need that feature for 2D datasets... how about
that. At least the same recipe doesn't seem to work:

In[1]:=  data = Flatten[Table[{x,y,Sin[x]Cos[y]},{x,0.,5.,1.},{y,0.,5.,1.}],1];

In[2]:= ff=Interpolation[data]

Out[2]= InterpolatingFunction[{{0., 5.}, {0., 5.}}, <>]

In[3]:= ff[2,3]

Out[3]= -0.900198

In[4]:= D[ff[x,y],x]

Out[4]= D[InterpolatingFunction[{{0., 5.}, {0., 5.}}, <>][x, y], x]

In[5]:= Derivative[1,0][ff][2,3]

                                                         (1,0)
Out[5]= (InterpolatingFunction[{{0., 5.}, {0., 5.}}, <>])     [2, 3]

Pekka







  • Prev by Date: Integration of a trig funt
  • Next by Date: Mathematica Question
  • Previous by thread: Integration of a trig funt
  • Next by thread: Indexing Output Files