how to fit exponantial function matlab ?

3 visualizaciones (últimos 30 días)
best16 programmer
best16 programmer el 22 de Abr. de 2017
Comentada: Walter Roberson el 24 de Abr. de 2017
hi everyone i have this exponantial function and i want fit it so i can get the A,B and C values
can you please help me with this. thanks for advance
  2 comentarios
Walter Roberson
Walter Roberson el 22 de Abr. de 2017
Is that "+ C" inside the summation or outside it? Is it part of the exponent of the exp() ?
best16 programmer
best16 programmer el 22 de Abr. de 2017
no it is not part of the exponent

Iniciar sesión para comentar.

Respuestas (2)

Walter Roberson
Walter Roberson el 22 de Abr. de 2017
Fitting a sum of exponentials is difficult to do well.
I suggest you start with cftool, request a custom equation, and enter your model. Then click on "Fit Options" and enter whatever constraint information you have available.
The underlying routine for this will be lsqnonlin()
lsqnonlin() does not necessarily find the best fit inside the given bounds: instead it goes for 95% confidence intervals. Once you have an estimate of the parameters, you might be able to use fmincon or fminsearch to refine the estimate.
  1 comentario
best16 programmer
best16 programmer el 22 de Abr. de 2017
thank you for the answer,let's say i did fit this function, how can i get all the values of B in one column?

Iniciar sesión para comentar.


John D'Errico
John D'Errico el 22 de Abr. de 2017
Editada: John D'Errico el 22 de Abr. de 2017
In theory, this is a problem solvable using the curvefitting toolbox, or lsqnonlin (optimization TB), lsqcurvefit(optimization TB), nlinfit(stats TB),etc. So it depends on what toolboxes you have available, although each of those tools has a somewhat similar calling structure. You could also use fminsearch to do the optimization if you have no more than about two terms in the sum, since fminsearch tends to be poor for large problems in general.
In practice, sums of exponentials problems quickly become impossible for more than a couple of exponential terms. You need to have great data, with very low noise. Lots of data is good too, as long as it is low noise. Even then, you will ABSOLUTELY need good starting estimates for the parameters.
The problem is this quickly becomes highly ill-posed. Any noise at all will blow it out of the water, yielding garbage for results. If you think you can solve this with n=5 or so, you are just wasting your time.
  22 comentarios
best16 programmer
best16 programmer el 23 de Abr. de 2017
i will upload this picture so i can tell you what to get
this software can use this function and get the Tau for the wanted signal.
Walter Roberson
Walter Roberson el 24 de Abr. de 2017
My tests for the form a0 + a1 * exp(-x/b1) suggest
a0 = 0.000549262354656014
a1 = -0.000133005477037469
b1 = 22.3758394031684
You can get these values with cftool and a custom equation, but you need to apply some boundary conditions, such as 0..10, -2..10, -10..50

Iniciar sesión para comentar.

Categorías

Más información sobre Get Started with Curve Fitting Toolbox en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by