Re: Extrapolation in mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg51549] Re: Extrapolation in mathematica*From*: DrBob <drbob at bigfoot.com>*Date*: Thu, 21 Oct 2004 22:21:42 -0400 (EDT)*Reply-to*: drbob at bigfoot.com*Sender*: owner-wri-mathgroup at wolfram.com

Just turn off the error message. For instance: data = Table[x + 5Random[], {x, 1, 20}]; f = Interpolation[data]; Off[InterpolatingFunction::"dmval"] Plot[f@x, {x, 0, 21}]; Extrapolations are usually meaningless, however--as a few trials of the code will clearly demonstrate. For instance, the following fit is lousy outside the data range: g = 2 - x + x^2 + x^3 + x^4; data = Table[g, {x, 1, 20}]; f = Interpolation[data, InterpolationOrder -> 3]; Plot[{g, f[x]}, {x, -5, 0}] But changing InterpolationOrder makes it perfect: f = Interpolation[data, InterpolationOrder -> 4]; Plot[{g, f[x]}, {x, -5, 0}] Bobby From: brindaban at gmail.com (nilaakash) To: mathgroup at smc.vnet.net Subject: [mg51549] Extrapolation in mathematica Organization: Steven M. Christensen and Associates, Inc and MathTensor, Inc. Dear Anybody could you tell me how to extrapolate data in mathematica. I can interpolate my data, but extrapolation is not working. Thanks. nilaakash