derivative of cubic spline
- To: mathgroup at smc.vnet.net
- Subject: [mg66543] derivative of cubic spline
- From: "Jaccard Florian" <Florian.Jaccard at he-arc.ch>
- Date: Fri, 19 May 2006 03:40:20 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Dear All,
I would like to know how to derivate a spline function constructed by
Mathematica.
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
Mathematica...
Regards
F.Jaccard
florian.jaccard at he-arc.ch