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

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

Search the Archive

Re: Calc formula from table



Pieter van Wyk wrote:
> 
> Could anyone help me: I need to know how to calculate a third order
> parabolic
> formula from a table. I.o.w. I have a table of data and I need a manual
> way to calculate the formula for the curve of the data . 3rd order
> formula to be obtained:
> Y=AX**3 + BX**2 + CX + D
> 
> example data:
> y = 338.7    263.5    198.6    150.5    114.7    80.3    55.5    41.9
> 30.2    19.3    16.5  12.4 10.1
> x=  30        40            50        60        70        80 90
> 100    110    120    130  140  150
> 
>     answer: Y=-0.0002X**3 + 0.0896X**2 -12.945X +651.3
> 
> I need a manual method to calculate this formula.
> 
> Can it be done without using integration/differentiation. Maybe lin log
> exp?
> 
> Answers will be appreciated. Regards, Pieter.


Simplest way I know of would be to use Fit.

In[20]:= xvals = {30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140,
150};

In[21]:= yvals = {338.7, 263.5, 198.6, 150.5, 114.7, 80.3, 55.5, 41.9,
        30.2, 19.3, 16.5, 12.4, 10.1}; General::spell1:
   Possible spelling error: new symbol name "yvals"
     is similar to existing symbol "xvals".

In[22]:= data = Transpose[{xvals,yvals}];

In[23]:=  Fit[data, {1,x,x^2,x^3}, x] // InputForm Out[23]//InputForm=
651.3037962053982 - 12.94513569772329*x + 0.08956081418702694*x^2 -
 0.00021191724942238452*x^3


Daniel Lichtblau
Wolfram Research



  • Prev by Date: Re: choose with replacement
  • Next by Date: Re: Calc formula from table
  • Prev by thread: Calc formula from table
  • Next by thread: Re: Calc formula from table