MathGroup Archive 2004

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

Search the Archive

Re: plotting the derivative of a splined/interpolated function


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