MathGroup Archive 2002

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

Search the Archive

Re: Stop extrapolation outside range

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32734] Re: [mg32680] Stop extrapolation outside range
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Thu, 7 Feb 2002 05:10:57 -0500 (EST)
  • References: <200202060841.DAA02192@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Define a new function, t, like this:

In[1]:=
t[x_] := int[x] /; 1 <= x <= 10;
t[x_] := 0 /; x < 1 || x > 10;

and use it instead of int. It will give you 0 whenever you're outside the
interpolation range. BTW, the name is "Interpolation", not "Interpolate".

Tomas Garza
Mexico City

----- Original Message -----
From: "Yas" <yast at optushome.com.au>
To: mathgroup at smc.vnet.net
Subject: [mg32734] [mg32680] Stop extrapolation outside range


> Hi,
> How do I go about stopping Mathematica from using extrapolation when the
> specified data range falls outside the actual data range from which the
> Interpolating function was generated?
>
> e.g.
> data = {{x1,y1}.......{xn,yn}};
> int = Interpolate[data];
> t1=Table[int[x],{x, xi, xf, dx}]
>
> with xn != xf.
>
> When xn != xf, Mathematica correctly points out that the point xf lies
> outside the data range of the Interpolating function and proceeds to
> extrapolate. How do I stop it from extrapolating.
>
> Thanks
> Yas
>
>
>
>
>



  • Prev by Date: Re: Stop extrapolation outside range
  • Next by Date: Re: Docs for ml32i1.dll
  • Previous by thread: Stop extrapolation outside range
  • Next by thread: Re: Stop extrapolation outside range