MathGroup Archive 2001

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

Search the Archive

Re: Combining several InterploatingFunction to one

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30228] Re: Combining several InterploatingFunction to one
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 3 Aug 2001 00:55:59 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <9kb06q$c4d$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

have the functions continuous derivatives at the interval ends ???
If yes

GlueInterpolation[ips : {__InterpolatingFunction}] :=
  Module[{dta},
    dta = 
      Union[Transpose[
          Join @@@ Transpose[{#[[3, 1]], Last[Last[#]]} & /@ ips]]];
    Interpolation[dta]
    ]


and

itab = Table[
    FunctionInterpolation[Sin[x], {x, i*0.6, (i + 1)*0.6}], {i, 0, 2}];

dd = GlueInterpolation[itab];

Plot[Evaluate[dd[x]], {x, 0, 1.8}];

works fine. You should be carefull look if you have a argument
in the interpolation function.

Regards
  Jens


Max Ulbrich wrote:
> 
> Hi,
> 
> does anyone know how to combine several interpolating functions to ONE
> single interploating function?
> I now have
> 
> Which[0. <= t <= 0.01, InterpolatingFunction[{{0., 0.01}}, "<>"],
>         0.01 <= t <= 0.02, InterpolatingFunction[{{0.01, 0.02}}, "<>"],
>         0.02 <= t <= 0.03, InterpolatingFunction[{{0.02, 0.03}},
> "<>"]][t]
> 
> but I would like to have
> 
> InterpolatingFunction[{{0., 0.03}}, "<>"][t]
> 
> that is piecewise defined from all of the three.
> Suggestions please to
> 
> ulbrich at biochem.mpg.de
> 
> Thanks!
> 
> Max


  • Prev by Date: Trouble with Mathematica 4.1 after uninstalling Mathematica 3.0
  • Next by Date: Re:"Limit involving square root"
  • Previous by thread: Combining several InterploatingFunction to one
  • Next by thread: Re: Combining several InterploatingFunction to one