MathGroup Archive 2004

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

Search the Archive

RE: simple questions about splinefit

  • To: mathgroup at
  • Subject: [mg48403] RE: [mg48378] simple questions about splinefit
  • From: David.Annetts at
  • Date: Fri, 28 May 2004 00:50:31 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Hi Long,

>   i used splinefit function to fit some data and get a 
> funtion i name it "spline1".but  i can not figure out the 
> relationship between the input variable of "spline1 "and the  
> returned values from "spline1".and how to calculate the 
> derivative of spline1.
> can anyone give me some suggestions?

It's explained in the online help.  SplineFit[] returns a parametisation
of your data.

	data = {#, Sin[2 Pi #/64]} & /@ Range[0., 32.]
	splin = SplineFit[N[data], Cubic]
	splin[#] & /@ Range[0, 32] - data

Because of a spline's properties, you are not restricted to sampling at
integer values -- splin[1.5] returns the {x, y} pair at splin[1.5].
Note also that different splines have different properties; the above
example only works for cubic splines.



  • Prev by Date: Re: SetPrecision - What does in find?
  • Next by Date: stepwise ode. why does this fail?
  • Previous by thread: simple questions about splinefit
  • Next by thread: style sheet for typesetting?