Horizontal asymptote of exponential decay

Hello, does anyone know how to find the horizontal asymptote of an exponential decay function?

 Accepted Answer

Evaluate the function at infinity.

6 Comments

Thanks, but I guess I should be more specific. I have a set of data that I need to estimate the horizontal asymptote of. I have a code that sort of does this, but I do not think it is what I want. I have a set of equations already that assumes the asymptote at zero. so for example, y=1.24e^-0.005+0.
Any ideas on ow I code use the below code to estimate x at infinity?
Here is the code.
syms x
nominator=1.364.*exp(-x); % please change the value of nominator
denominator=1; % please change the value of denomiantor in this
%case it is 1
f=nominator./denominator;
hold on
ezplot(f) % displays the plot of the function
xlabel('Time Across Night')
ylabel('SWA')
vertical_aymtote=limit(f,inf) % horizontal asymptose is there where
%vertical function becomes parallel to x axis ie x approaches to
%+infinity or x approaches to - infinity
So the general form is A*exp(B)+C ?
yes exactly, thanks
Perhaps diff() the data, log() that, least squares fit to find log(A) and B, use those coefficients for your existing x, subtract the projected results, linear fit the residue to get C ?
There would, I am sure, be more rigorous methods using the curve fitting toolbox or doing a non-linear leastsquared fit, but possible the above would be "close enough", or at least "close enough for starting values" for a full non-linear leastsquared fit.
I would never of thought of this and this does make more sense. Thank you for your response. MUCH APPRECIATED!
The diff() should logically be fitted with a difference of x coordinates, but since your x is in the exponent, A*exp(B*x)+C, subtracting for two different x... (A*exp(B*x1)+C) - (A*exp(B*x2)+C) = A*(exp(B*x1)-exp(B*x2)) and then you do not get nice clean log(exp(B*x)) -> B*x like I was thinking when I proposed the above.
I think a nonlinear least-squares is going to be needed.

Sign in to comment.

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!