Lab 3 Final.
Lab 3 Final.
Lab 3 Final.
Course Instructor:
Lab Engineer:
Semester
LAB EXPERIMENT # 03
Generation of Continuous and Discrete time Exponential Signals in MATLAB
OBJECTIVE:
EXPONENTIAL SIGNALS:
In mathematics, the exponential function is the function ex, where e is the number (approximately
2.718281828) such that the function ex is its own derivative. The exponential function is used to
model a relationship
in which a constant change in the independent variable gives the same proportional change (i.e.,
percentage increase or decrease) in the dependent variable. The function is often written as exp(x),
especially when it is impractical to write the independent variable as a superscript. The exponential
function is widely used in physics, chemistry, and mathematics.
The graph of y = ex is upward-sloping and increases faster as x increases. The graph alwayslies above
the x-axis but can get arbitrarily close to it for negative x. So, we obtain converging graph for negative
values of x and diverging graph for positive values of x.
y(t)=Ae-(at)
OR
y(t)=Ae(at)
subplot(312) plot(x,y1,'r')
grid on xlabel('Time') ylabel('cos(x)')
title('graph of time vs cos(x)')
subplot(313) plot(x,y2,'m')
grid on xlabel('Time')
ylabel('tan(x)')
title('graph of time vs tan(x)')
%%end
To find the polar/rectangular form of complex number we use the Matlab command:
Let z= x+ yj
PRACTICE QUESTIONS
1. Plot the following function x(t)= Ceat Lets c>0 and draw for a<0 and a>0. Code: Code:
Graph:
2. Convert any number from polar to Cartesian form using Matlab code
3. Draw the following signal x(t)= 4e-2tcos(6t-60o). [First plot both the functions individually then
draw the plot of their product in the third graph using subplot]
4. Plot the Even and Odd Part of the signal x(t)= e-at for a>0.
Code:
5. clc
6. clear all
7. close all
8. a = 1;
9. t = -5:0.01:5;
10. xt = exp(-a * t); % x(t)
11. xnegt = exp(-a * (-t)); % x(-t)
12. % Even part of the signal
13. x_even = (xt + xnegt) / 2;
14. % Odd part of the signal
15. x_odd = (xt - xnegt) / 2;
16. % Plot the original signal
17. subplot(3, 1, 1);
18. plot(t, xt, 'b', 'LineWidth', 1.5);
19. title('Original Signal x(t) = e^{-at}');
20. xlabel('Time (t)');
21. ylabel('x(t)');
22. grid on;
23. % Plot the even part
24. subplot(3, 1, 2);
25. plot(t, x_even, 'r', 'LineWidth', 1.5);
26. title('Even Part of the Signal');
27. xlabel('Time (t)');
28. ylabel('x(t)');
29. grid on;
30. % Plot the odd part
31. subplot(3, 1, 3);
32. plot(t, x_odd, 'g', 'LineWidth', 1.5);
33. title('Odd Part of the Signal');
34. xlabel('Time (t)');
35. ylabel('x_{odd}(t)');
36. grid on;
Graph:
Rubrics: