Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: InterpolatingPolynomial error message

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115745] Re: InterpolatingPolynomial error message
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 19 Jan 2011 05:31:17 -0500 (EST)

data = {{105, 1.5, 33.0127}, {110, 1.5, 32.2962}, {115, 1.5, 31.6448}, {120, 
    1.5, 31.054}, {12 5, 1.5, 30.5196}, {130, 1.5, 30.0374}, {135, 1.5, 
    29.6036}, {140, 1.5, 29.2143}};

Your y values do not change so your z values are a function of x only

data2 = {First[#], Last[#]} & /@ data;

p[x_] = InterpolatingPolynomial[data2, x]

29.2143 + (-0.016316249999999987 + (-0.0020490992063492072 + 
             (0.000052530224867725074 + (-8.27697089947109*^-7 + 
                       (1.6788227513227815*^-8 + (-2.257901234566787*^-10 + 
                   4.1283629950565406*^-12*
                                   (-135 + x))*(-110 + x))*(-130 + 
                x))*(-120 + x))*(-105 + x))*(-60 + x))*
     (-140 + x)

Adding some variation to y values; then, from the documentation, the data input to InterpolatingPolynomial needs to be in the form {{x, y}, z}

data3 = {{105, 1.51, 33.0127}, {110, 1.52, 32.2962}, {115, 1.53, 
    31.6448}, {120, 1.54, 31.054}, {12 5, 1.55, 30.5196}, {130, 1.56, 
    30.0374}, {135, 1.57, 29.6036}, {140, 1.58, 29.2143}};

Clear[p2]

p2[x_, y_] = InterpolatingPolynomial[{Most[#], Last[#]} & /@ data3, {x, y}]

-1.871143893006053*^14 + 1.4393414561594894*^14*y + 
   x*(2.830704863796093*^12 + 
    x*(4.797804853934087*^9 + 9.753635951328395*^-7*x - 
             0.036290178571431735*y) + 
    y*(-2.398902426956662*^12 + 8.036571428574462*y))


Bob Hanlon

---- VICTOR <victor.herasme at gmail.com> wrote: 

=============
Hi,

i am trying to get a function for this data set:

data={{105,1.5,33.0127},{110,1.5,32.2962},{115,1.5,31.6448},{120,1.5,31.054},{125,1.5,30.5196},{130,1.5,30.0374},{135,1.5,29.6036},{140,1.5,29.2143},...}

i execute the command:

P=InterpolatingPolynomial[data,{x,y,z}]; And i get this error message:

InterpolatingPolynomial::ipab: Abscissa specification 105 in {105,1.5,33.0127} is not a point in 3 dimensions. >>

I dond't know what's going on. Can anyone help me please ? Regards,

Victor



  • Prev by Date: Re: Using FindRoot on an equation involving Log terms
  • Next by Date: Re: Using FindRoot on an equation involving Log terms
  • Previous by thread: Re: InterpolatingPolynomial error message
  • Next by thread: moving equations between Mathematica and TeXShop