Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

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




  • Prev by Date: Re: Formatting numbers for output
  • Next by Date: Re: conditionnal rule
  • Previous by thread: Re: Extrapolation in mathematica
  • Next by thread: Re: Extrapolation in mathematica