Re: Merging InterpolationFunctions
- To: mathgroup at smc.vnet.net
- Subject: [mg57288] Re: Merging InterpolationFunctions
- From: dh <dh at metrohm.ch>
- Date: Tue, 24 May 2005 05:12:26 -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 >> >> > > >
- References:
- Merging InterpolationFunctions
- From: Kerry Kim <kjkim@u.washington.edu>
- Merging InterpolationFunctions