Prev: www.cnnikebrand.com wholesale Nike Sneakers,jordans sneaker
Next: www.voguesneakers.com Wholesale Cheap Jordans,Air Max 2010,Nikes,Nike Shox NZ
From: vinay on 2 Apr 2010 08:59 i have a exponential curve {with data t=[0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1],z=[0 0.38 0.5 0.58 0.59 0.595 0.6 0.6 0.6 0.6 0.6]} and it's equation : A0+A1e^(-a1*t)+A2e^(-a2*t) ,now i want to find values of constants A0,A1,A2,a1,a2.
From: John D'Errico on 2 Apr 2010 09:17 "vinay " <vinay.pandey88(a)gmail.com> wrote in message <hp4pna$1ie$1(a)fred.mathworks.com>... > i have a exponential curve {with data t=[0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1],z=[0 0.38 0.5 0.58 0.59 0.595 0.6 0.6 0.6 0.6 0.6]} and it's equation : > A0+A1e^(-a1*t)+A2e^(-a2*t) ,now i want to find values of constants A0,A1,A2,a1,a2. You are kidding, right? At the very least, you are fooling yourself if you even remotely imagine that you can estimate 5 different coefficients from this useless, terrible data. Worse, you hope to estimate a sum of exponentials model, something that is notoriously ill-conditioned. I'd suggest prayer as your best bet here, except you don't have a prayer that you can estimate those coefficients with any degree of confidence. At the very best, you can try to estimate the simpler model: A0+A1e^(-a1*t) Use the curve fitting toolbox for that, or the optimization toolbox, or nlinfit from the stats toolbox, or many other functions to be found on the FEX. But don't even bother to try to estimate the first model that you posed. Any coefficients that you get will be complete garbage. John
From: Mark Shore on 2 Apr 2010 11:05
"vinay " <vinay.pandey88(a)gmail.com> wrote in message <hp4pna$1ie$1(a)fred.mathworks.com>... > i have a exponential curve {with data t=[0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1],z=[0 0.38 0.5 0.58 0.59 0.595 0.6 0.6 0.6 0.6 0.6]} and it's equation : > A0+A1e^(-a1*t)+A2e^(-a2*t) ,now i want to find values of constants A0,A1,A2,a1,a2. First plot your data and then look at it. The last five points all have the same z value, and the number of significant figures varies from 1 to 2.5 at best. How could you expect to generate five independent fitting parameters from this data? Also to follow up on John's point about ill-conditioning, I've attached an excerpt from a vintage MATLAB Central post that includes a readily accessible reference (http://www.mathworks.com/matlabcentral/newsreader/view_thread/4783): Leiming-- It might not be easy to find a sum-of-exponentials mfile, because for y = Ae^ax + Be^bx, "an exponential equation of this type in which all four parameters are to be fitted is *extremely* ill conditioned. That is, there are many combinations of (a,b,A,B) that will fit most exact data quite well indeed..." (Forman S. Acton, Numerical Methods That Work, p. 253). On the bright side, if you already know a and b, then A and B can be calculated by linear least squares fit, z = [exp(a*x); exp(b*x)]; c = y/z; % c(1) = A c(2) = B assuming all data points are equally weighted and x and y are row vectors. --Dave |