MathGroup Archive 2010

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

Search the Archive

Re: Combining InterpolatingFunctions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107219] Re: Combining InterpolatingFunctions
  • From: JH <jlucio at ubu.es>
  • Date: Fri, 5 Feb 2010 07:13:19 -0500 (EST)
  • References: <hk8nqs$8ne$1@smc.vnet.net>

Perhaps this is what you want. If not, please tell us (a bit more
concrete, if possible):

f1 = NDSolve[{y''[x] + y[x] == 0, y[0] == 0, y'[0] == 1}, y, {x, 0, \
[Pi]}][[1]];
f2 = NDSolve[{y''[x] + y[x] == 0, y[\[Pi]] == -1, y'[0] == 1}, y, {x, \
[Pi], 2 \[Pi]}][[1]];

AND  (

Plot[y[x] /. (f1 Boole[0 < x < \[Pi]] +
    f2 Boole[\[Pi] < x < 2 \[Pi]]), {x, 0, 2 \[Pi]}]

OR

Plot[y[x] /.
  If[0 < x < \[Pi], f1, If[\[Pi] < x < 2 \[Pi], f2, None]], {x, 0,
  2 \[Pi]}]

)

Bye,

   JH


  • Prev by Date: Re: Re: Re: Combining
  • Next by Date: Re: Can Mathematica interpolate non-uniform scatter data?
  • Previous by thread: Re: Combining InterpolatingFunctions
  • Next by thread: Can Mathematica solve this differential equation ?