# Thread: [SOLVED] best fit of exponential function

1. ## [SOLVED] best fit of exponential function

Hi,
I am looking to fit a set of data with the following exponential.

y = a + b*exp(-x/c) + (d*x/c)*exp(-x/c) with x>0.

So i would like to find the best four values for the parameters a to d.
I am trying to work out something with a least squares method but I am not sure how to start (problems with how to weight y). Does anyone have an idea here?

Any answer would be highly appreciated!

2. Originally Posted by roeppieroeppie
Hi,
I am looking to fit a set of data with the following exponential.

y = a + b*exp(-x/c) + (d*x/c)*exp(-x/c) with x>0.

So i would like to find the best four values for the parameters a to d.
I am trying to work out something with a least squares method but I am not sure how to start (problems with how to weight y). Does anyone have an idea here?

Any answer would be highly appreciated!
This calls for a numerical approach. Using a simple derivative-free method (Nelder-Mead) might be enough. In Matlab this is implemented as "fmins". Redo the computation a number of times to see if the solution depends on the start data (there may be more than one solution for such a problem).

A fancier method would be a Gauss-Newton method - it requires more programming, however.