Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: SplineFit - Parametrization ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31310] Re: SplineFit - Parametrization ?
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Sat, 27 Oct 2001 01:08:22 -0400 (EDT)
  • References: <9rb8h5$5mm$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Justus:

    DATA := Table[{i^2, Random[Real, {-1., 1.}]}, {i, 10}];
    splinefit = SplineFit[DATA, Cubic];

    gr=ParametricPlot[splinefit[u],{u,0,9},Compiled->False];

    fn=Interpolation[Cases[gr, Line[pts_]:>pts, Infinity][[1]]]

    InterpolatingFunction[{{1.,100.}},<>]

    Plot[fn[x],{x, 1, 100}];

We could use Table instead of Plot to generate the points used in
Interpolation

    fn2= Interpolation[Table[splinefit[u],{u,0,9, .1}]]

    InterpolatingFunction[{{1.,100.}},<>]

    Plot[fn[x]-fn2[x],{x,1,100}, PlotRange->All];

--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Justus Heimann" <Heimann at ism.tu-berlin.de> wrote in message
news:9rb8h5$5mm$1 at smc.vnet.net...
> Hi,
>
> I got a question concerning the "SplineFit[DATA, Cubic]" function of the
> NumericalMath`SplineFit` Package.
>
> My problem is to fit a cubic spline to a set of numerical 2d data. E.g.
> using simply x,y-data like:
>
> DATA := Table[{1.*i^2, Random[Real, {-1., 1.}]}, {i, 10}];
> splinefit := SplineFit[DATA, Cubic];
> splinefit[u=f(x,y)][[1]] =! x ???
>
> I found that SplineFit works much more accurate like e.g. the function
> Interpolation. That's why I switched from Interpolation to SplineFit.
>
> The problem is, that using SplineFit (in contrast to Interpolation),
> specfific data along the curve only can be identified by the curve
> parameter value. But actually I'm interested to explicitly get a curve
> value f(x) as function of x! Is this possible with SplineFit ? In case
> not, does anybody know how are the parameter values linked to the x, y
> values ?
>
> It seems that the parameter, say "u=f(x,y)", is running like
> U=[0,1,2,...,Length[DATA]-1] along the data points, somehow a uniform
> (integer) curve parametrization. But what happens with the parameter  in
> between data points ?
>
> Thanks alot,
> Justus
>




  • Prev by Date: Re: Solution for coupled PDE via Mathematica
  • Next by Date: diagonalization
  • Previous by thread: SplineFit - Parametrization ?
  • Next by thread: Re: SplineFit - Parametrization ?