Fitting a polynomial + exponential curve of a given form to data

1.5k Views Asked by At

I have got a number of data sets of some parameter $m_x$ against an independent variable $x$. Through each of the data sets I need to best fit a curve of the form $A + Bc^x$ such that $A$, $B$ and $c$ are arbitrary parameters. How can I best do it, preferably with Excel or Mathematica?

2

There are 2 best solutions below

0
On BEST ANSWER

In Mathematica you have to import your data as table for $x$ and $y$ values. The data can have the form $$\text{data}=\{\{x_1,y_1\},\{x_2,y_2\},...,\{x_n,y_n\}\}$$

You can create your model as

model = A+B*c^x

Then you can use FindFit function as

FindFit[data, model, {A,B,c},x]
2
On

If you let y=m_x then y = A + B * C^x. Therefore, log(y-A) = log(B) + x * log(C), which is a bivariate linear regression problem, to which you can apply LSE to find the slope log(C) and the (y-A)- intercept is log(B). Then you work your way backwards to y.