Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Type the following code in Matlab and see the results. X=-2*pi:0.1:pi*2; Step =h

ID: 2085793 • Letter: T

Question

Type the following code in Matlab and see the results.

X=-2*pi:0.1:pi*2;

Step =heaviside (X);
Exp= exp(X);

figure (1);
subplot(2,1,1); plot (X,Step); title('1) . . . . . . . . . .');
grid minor
axis([-2*pi 2*pi -.5 1.5])
subplot(2,1,2); plot (X,Exp); title('2). . . . . . . . . .');
grid minor
axis([-2*pi 2*pi -.5 1.5])

1- What are these functions’ name?
2- Calculate the energy of the second signal for X>0.

3- Make some change to make your plot look like the following figure.

1.5 0.5 0 0.5 6 .2 2 6 2) 1.5 X: 0.1168 Y:0.5576 0.5 0.5 2 6

Explanation / Answer

1. The first function is a unit step function and the second function is an exponentially decaying function.

2. Since the second function is an exponential function, for x>0 its energy is infinite.