EXPERIMENT - 8
AIM
To plot Continuous and Discrete Decaying Exponential Function in MATLAB.
THEORY
In mathematics, an exponential function is a function of the form
,in which the input variable x occurs as an exponent. Where the value of e ≈ 2.71828... and the function approaches 0 at Infinity.
MATLAB COMMANDS USED
* plot(x,y,color,properties)
* exp(t);
* stem(x)
MATLAB CODE
t=0:0.01:1;
y=exp(-5*t);
subplot(2,1,1);
plot(t,y,'g');
title('Decaying Exponential function Y(t)=e^{-6x}');
xlabel('Time t (sec)');
ylabel('Y(t)')
n=0:1:50;
e=exp(-5*n/50);
subplot(2,1,2);
stem(n,e,'go','filled');
title('Discrete Decaying Exponential function Y(n)=e^{-6n}');
xlabel('Sample Number n ');
ylabel('Y(n)')
print('exponential','-dpng')
RESULT
The Continuous and Discrete versions of Decaying Exponential Function has been plotted.