From: Nellie rajarova on
I have a dat file with the 1st column as X data and 2nd column as Y data. I have to fit the data in a format a1exp(t)+a2exp(t)+...(n terms) and then also get the coefficients a1,a2,a3...(n coefficients). How can I do that using matlab?
From: us on
"Nellie rajarova" <nellie.rajarova(a)gmail.com> wrote in message <hop67q$f5d$1(a)fred.mathworks.com>...
> I have a dat file with the 1st column as X data and 2nd column as Y data. I have to fit the data in a format a1exp(t)+a2exp(t)+...(n terms) and then also get the coefficients a1,a2,a3...(n coefficients). How can I do that using matlab?

a hint:
- look at the curve fitting tbx...

http://www.mathworks.com/products/curvefitting/

us
From: Torsten Hennig on
> I have a dat file with the 1st column as X data and
> 2nd column as Y data. I have to fit the data in a
> format a1exp(t)+a2exp(t)+...(n terms)

Do you mean
a1*exp(t)+a2*exp(2t)+...an*exp(n*t)
here ?

>and then also
> get the coefficients a1,a2,a3...(n coefficients).
> How can I do that using matlab?

Best wishes
Torsten.
From: John D'Errico on
"Nellie rajarova" <nellie.rajarova(a)gmail.com> wrote in message <hop67q$f5d$1(a)fred.mathworks.com>...
> I have a dat file with the 1st column as X data and 2nd column as Y data. I have to fit the data in a format a1exp(t)+a2exp(t)+...(n terms) and then also get the coefficients a1,a2,a3...(n coefficients). How can I do that using matlab?

You won't be able to do it, REGARDLESS of which
tool you use. In fact, even two terms will be one
too many as you have written this model. See that

a1*exp(t)+a2*exp(t) = (a1 + a2)*exp(t)

All that you can ever estimate here is the sum of
these coefficients.

I suspect however, that you really wanted to ask
about the model

a1*exp(b1*t)+a2*exp(b2*t) + ...

While you can estimate that model, this is a
notoriously poorly posed problem. Estimation of
multiple terms here is still quite difficult to do
well, and it will require very good data as well as
very good starting values for the parameters.

John
From: Mark Shore on
snip
>
> a1*exp(b1*t)+a2*exp(b2*t) + ...
>
> While you can estimate that model, this is a
> notoriously poorly posed problem. Estimation of
> multiple terms here is still quite difficult to do
> well, and it will require very good data as well as
> very good starting values for the parameters.
>
> John

Hello John.

I hadn't realized that this was a known poorly-posed problem. Are there alternative approaches, or is it simply fundamentally difficult to uniquely fit data to a sum of exponential functions?
 | 
Pages: 1
Prev: Pretty function
Next: symbolic maths