Derivative of InterpolatingFunction
- To: mathgroup at smc.vnet.net
- Subject: [mg59745] Derivative of InterpolatingFunction
- From: pdickof at scf.sk.ca
- Date: Fri, 19 Aug 2005 04:32:33 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
I wish to compute gradients of three-dimensional interpolating
functions. The browser entry for InterpolatingFunction claims taking
derivatives is possible and does not mention limitations in the
dimensionality. My naive attempts based on the example for gradients in
the browser entry for D have failed even for two dimensions:
data = Table[x^2 Sin[ y], {x, -2., 2.}, {y, -2., 2.}];
approx = ListInterpolation[data, {{-2, 2}, {-2, 2}}];
approxGradient = D[approx[x, y], {{x, y}, 1}]
approxGradient[1, 1]
Searching this newsgroup, the closest thing I have found is the 1996
post by Paul Abbot (extract below). Have "enhancements for higher
dimensions" been incorporated?
Peter Dickof
+--------------------------
In The Mathematica Journal 4(2):31 the following appears:
Partial Derivatives
Presently, Mathematica cannot handle partial derivatives of
InterpolatingFunctions. The package DInterpolatingFunction.m, provided
by Hon Wah Tam (t... at wri.com) and included in the electronic
supplement, computes partial derivatives of two-dimensional
InterpolatingFunctions. Enhancements for higher dimensions will
eventually be incorporated into Mathematica.
+----------------------------------