Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Merging InterpolationFunctions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57288] Re: Merging InterpolationFunctions
  • From: dh <dh at metrohm.ch>
  • Date: Mon, 23 May 2005 04:30:40 -0400 (EDT)
  • References: <200505200843.EAA00614@smc.vnet.net> <d6peal$1gq$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Kerry and Chris,
If your functions are only C0 at the boundary, then 
FunctionInterpolation will distort the merged function near the 
boundary. In version 5.1 there is "Piecewise" that takes care of this 
problem.

However, depending of what you want to do with the merged function, 
there may be a much simplier solution:
a3[x_]= If[x<=10,a1[x],a2[x]]

Sincerely, Daniel

Chris Chiasson wrote:
> You can use UnitStep (or Which) and FunctionInterpolation to make a
> new interpolating function.
> 
> On 5/20/05, Kerry Kim <kjkim at u.washington.edu> wrote:
> 
>>Is there a way to combine two InterpolatingFunctions which share a
>>common boundary, and are C0 continuous at the common boundary (the
>>values are continuous but the derivatives are NOT continuous at the
>>common boundary)?
>>
>>For example, I'm trying to combine the following:
>>
>>a1=NDSolve[large differential equation system, {t,0,10}]
>>
>>{{e2f -> InterpolatingFunction[{{0., 10.}}, <>], E2F -> \
>>InterpolatingFunction[{{0., 10.}}, <>], etc...}}
>>
>>a2=NDSolve[large differential equation system, {t,10,20}]
>>{{e2f -> InterpolatingFunction[{{10., 20.}}, <>], E2F -> \
>>InterpolatingFunction[{{10., 20.}}, <>], etc...}}
>>
>>and the combine a1 and a2 so that I get the following:
>>a3=Merge[a1,a2]
>>{{e2f -> InterpolatingFunction[{{0., 20.}}, <>], E2F -> \
>>InterpolatingFunction[{{0., 20.}}, <>], etc...}}
>>
>>I've read that the InterpolatingFunction internals may be version
>>specific, and I can't quite infer what they all mean.  I'm using
>>Mathematica version 5.0
>>
>>Thank you!
>>-Kerry Kim
>>
>>
> 
> 
> 


  • Prev by Date: Re: Printing from Mathematica 5.1
  • Next by Date: plot hyperbola
  • Previous by thread: Re: Merging InterpolationFunctions
  • Next by thread: Re: Merging InterpolationFunctions