MATLAB Answers

Equation for a growing and decaying exponential

78 views (last 30 days)
I like know whether any single equation is there for a growing and decaying exponential .i.e from minus infinity to zero it has to grow up to one (at zero one) and from zero to + infinity it has to decay.(All most look like a triangle wave).whether any equation will do this or not . Thanks in advance .

  0 Comments

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 15 Apr 2015
You can easily create your own. Here is an anonymous function that works:
x = [-10:0.1:10];
k = 2.0;
f = @(x,k) exp(-abs(k*x));
figure(1)
plot(x, f(x,k))
grid

  4 Comments

Show 1 older comment
Star Strider
Star Strider on 15 Apr 2015
Thank you John. I should have included an explanation of how it works. (Not fully awake here yet.)

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!