Just turn off the error message. For instance:
data = Table[x + 5Random[], {x, 1, 20}];
f = Interpolation[data];
Off[InterpolatingFunction::"dmval"]
Plot[***@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: ***@gmail.com (nilaakash)
Subject: Extrapolation in mathematica
Organization: Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Approved: Steven M. Christensen <***@smc.vnet.net>, Moderator
Dear
Anybody could you tell me how to extrapolate data in
mathematica. I can interpolate my data, but extrapolation is not
working.
Thanks.
nilaakash