MathGroup Archive 2006

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

Search the Archive

derivative of cubic spline

  • To: mathgroup at
  • Subject: [mg66543] derivative of cubic spline
  • From: "Jaccard Florian" <Florian.Jaccard at>
  • Date: Fri, 19 May 2006 03:40:20 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Dear All,

I would like to know how to derivate a spline function constructed by

The question has already been posted in :
[mg25221] First derivative of interpolated spline

But I wasn't able to find an answer in mathgroup.

Example :

data={{0, 1}, {1, 2.3}, {2, 2.5}, {3, 1.2}, {4, 0.47}, 
  {5, 0.38}, {6, 0.76}}

<< "Numericalmath`SplineFit`"

s = SplineFit[data, Cubic];

You can see that the spline is good :

ParametricPlot[s[x], {x, 0, 6}, PlotStyle -> Blue, 
   Epilog -> {{Blue, Text[HoldForm[y = s(x)], 
       {2.5, g1[2.5]}, Background -> White]}, 
     ({PointSize[0.03], Red, Point[#1]} & ) /@ data}, 
   PlotRange -> {-0.5, 3}, TextStyle -> 
    {FontFamily -> Times}];

But D[s[t],t] or s'[t] or so one doesn't help...
So I'm not able to see that the spline is better than Interpolation (in
the sense of a continuous derivative)!

Please help!
It's the first time I found something that is easier in MathCad than in

florian.jaccard at

  • Prev by Date: Re: Insulating data from code
  • Next by Date: (Newbie question): New types of numbers
  • Previous by thread: Re: queuing network model
  • Next by thread: Re: derivative of cubic spline