MathGroup Archive 1996

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

Search the Archive

Re: Fitting data with Splines

  • Subject: [mg3293] Re: Fitting data with Splines
  • From: withoff (David Withoff)
  • Date: 25 Feb 1996 15:21:50 -0600
  • Approved: usenet@wri.com
  • Distribution: local
  • Newsgroups: wri.mathgroup
  • Organization: Wolfram Research, Inc.
  • Sender: daemon at wri.com

In article <4fpdra$f9r at dragonfly.wolfram.com> aak at rmb.co.za (Ant Man)  
writes:
> Hi all
> 
> I have some data which I fit using the SplineFit function. 
> 
> I worked through the examplke given in the "Guide to Standard 
> 
> Mathematica Packages" on page 357 and everything works fine. 
> 
> Now say one has the function
> 
> spline = SplineFit[your points, Cubic]
> 
> and then 
> 
> spline[some point on curve]
> 
> gives the x and y coordinates for this point on the spline curve.
> 
> Is there some way in which one can just specify the x value so that
> 
> the y value is returned?
> 
> 
> Thanks
> 
> Antonie Kotze

The SplineFit function does cubic splines separately for the x and y
coordinates in terms of a parameter.  You could in theory eliminate the
parameter to get y in terms of x, but this is not the intended use of
SplineFit, and for about half a dozen reasons (it's difficult, the result
wouldn't be a spline, the result wouldn't in general be single valued,
and so forth) this is almost certainly not what you want to do.

Probably what you want to do is to fit a single cubic spline to your
data, rather than separate cubic splines to y and x.  You can find
a description of how to do that in books on interpolation or numerical
analysis, and there is at least one package on MathSource that includes
a short program to do it.  Search for "spline" on MathSource and
you should find the relevant items.

Dave Withoff
Research and Development
Wolfram Research


  • Prev by Date: Re: Fitting data with Splines
  • Next by Date: Re: Re: Student v. Full version of Mathematica
  • Previous by thread: Re: Fitting data with Splines
  • Next by thread: Mathematica installation on Windows 95