MathGroup Archive 2004

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

Search the Archive

Re: plotting the derivative of a splined/interpolated function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50758] Re: [mg50682] plotting the derivative of a splined/interpolated function
  • From: "David Annetts" <davidannetts at ihug.com.au>
  • Date: Sun, 19 Sep 2004 21:39:14 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Todd,


> BUT I can't seem to plot either dervie or dervie2 with the standard
> Plot ParametricPlot commands
> 
> So the question becomes is, how to I plot the derrivative of an
> interpolated or slpined function?

data = Table[{t, Sin[2 Pi t / 128]}, {t, 0, 128, .5}];
dint = Interpolation[data];
Plot[{dint[t], dint'[t]}, {t, 0, 128}, PlotStyle -> {Red, Black}];
Plot[{dint[t], dint''[t]}, {t, 0, 128}, PlotStyle -> {Red, Black}];

Works fine for me.

With regard to differentiating splines, I'd suggest interpolating the
spline, then differentiating the interpolant as above.  

Regards,

Dave.


  • Prev by Date: ScatterPlot3D Plot Symbol
  • Next by Date: Mathematica For Dummies
  • Previous by thread: Re: plotting the derivative of a splined/interpolated function
  • Next by thread: Bizarre bug