EXPERIMENT NO.2
ELEMENTARY DISCRETE TIME SIGNALS
OBJECTIVES:

To generate and plot unit sample, unit step sequence, unit ramp and exponential 

discretetime signals. To analyze the characteristics of a unit sample, unit step sequence, unit ramp and 
exponential discretetime signals.
PROCEDURE A: DISCRETETIME SIGNAL
1. Encode the following command:
n=0:10;
x=(0.8)^n;
a=gca()
a.thickness=2;
plot2d3(n,x);
xtitle('Graphical Representation of DiscreteTime Signal','n','x[n]');
Figure A1
2. Observe and draw the figure generated.
Figure A2
3. Retype again the command but this time change n=10:20; to n=5:20;. What is the result? (You can use separate paper for your explanation and to show the result).
OBSERVATIONS:
Figure A3
1. What type of discretetime signal is generated from the command?
2. Change x to a value greater than one and run again the program. What is the result?
PROCEDURE B: UNIT STEP SIGNAL
1. Encode the following command:
L=4;
n=L:L; x=[zeros(1,L), ones(1,L+1)]; a=gca();
a.thickness=2;
a.y_location="middle";
plot2d3(n,x);
xtitle('Graphical Representaion ofa UnitStep Signal','n','u[u]');
Figure B1
2. Change L=4; to L=10; and then retype again the other syntax. What is the result? (You can use separate sheet paper for your explanation and to show the result).
Figure B2
3. Change the value of a.thickness=2; to a.thickness=4; and the remove the a.y_location=”middle”; command. Run again the program. What is the result?(You can use separate paper for your explanation and to show the result).
Figure B3
4. Change the plot2d3(n,x): to plot(n,x);. What is the result?(You can use separate paper for your explanation and to show the result).
Figure B4
5. Type the following command and then compare it to the result of procedure B1.
n=4:4;
u=[0 0 0 0 1 1 1 1 1]; a=gca();
a.thickness=2;
a.y_location="middle";
plot2d3(n,u)
xtitle('Graphical Represenation of UnitStep Signal','n','u[n]');
Figure B5
6. Change a.y_location=”middle”; to a.y_location=”origin”; and then add the syntax mtlb_axis ([10 4 0 1.2]); and xtitle(“Graphical Representation of a UnitStep Signal delayed by two samples”, ‘n’, ‘u[n]’); . What is the result? (You can use separate paper for your explanation and to show the result).
Figure B6
7. The previous figure is a representation of a unit step signal “delayed” by two samples. Change u=[0 0 0 0 1 1 1 1 1]; to u=[0 0 0 0 0 0 0 1 1]; and the run again the program. You will observe a unit step signal “delayed” by three samples.
Figure B7
PROCEDURE C: UNIT SAMPLE SIGNAL
1. Encode the following program and observe the output.
L=4;
n=L:L;
x=[zeros(1,L),1,zeros(1,L)];
a=gca();
a.thickness=2;
plot2d3(n,x);
xtitle('Graphical Represenation of UnitSample Sequence','n','x[n]'); mtlb_axis([4 4 0 1.2]);
Figure C1
2. Type the following command and then compare it to the result of procedure C .1.
n=4:4;
s=[0 0 0 0 1 0 0 0 0]; a=gca();
a.thickness=2;
plot2d3(n,s);
xtitle('Grahical Representation of UnitSample Sequence','n','s[n]') mtlb_axis([4 4 0 1.2]);
Figure C2
3. Change s=[0 0 0 0 1 0 0 0 0]; to s=[0 0 0 0 0 0 0 1 0]; and run again the program. Observe the output. You will observe a unit sample discretetime signal “delayed” by 3 samples. Now change s=[0 0 0 0 0 0 0 1 0]; To s=[0 0 1 0 0 0 0 0]; and run again the program. Observe the output. You will observe a unit sample discrete time signal “delayed” by 3 samples.
Figure C3
Figure C4
PROCEDURE D: UNIT RAMP SIGNAL
1. Encode the following program and observe the output.
L=4;
n=L:L;
x=[zeros(1,L),0:L];
a=gca();
a.thickness=2;
a.y_location="origin";
plot2d3(n,x);
xtitle('Graphical Representation of UnitRamp Signal','n','x[n]')
Figure D1
2. Change L=4; to L=10; . Run again the program and observe the result. (You can use separate paper for your explanation and to show the result).
Figure D2
PROCEDURE E: EXPONENTIAL SIGNAL
1. Encode the following program and observe the result.
a=1.5;
n=1:10;
x=(a)^n; a=gca();
a.thickness=2;
plot2d3(n,x);
xtitle('Graphical Represenation of an Exponential Signal','n','x[n]');
Figure E1
2. Make the variable n in the program negative and run again the program. Observe the result. (You can use separate paper for your explanation and to show the result).
Figure E1
ANSWERS TO THE REPORT:
1. Make a program of a unit step discretetime signal with an “advanced” of 3 and 5 samples respectively. Use separate paper for your explanation and to show the result.
2. Compare the graph of a unit step and a unit sample signal. In what applications do a unit step and a unit sample signal used?
3. Make a program that will display a graphical representation of a decreasing and increasing exponential signal. Use separate paper for your explanation and to show the result.
Theoretical Discussion
In this experiment we learned about four different types of discrete time signals, those are unit step, unit ramp, impulse and exponential signal. Before knowing about the characteristics of these types of discretetime signals, we first, understand the characteristic of a discretetime signal by observing our output obtained in procedure A. Our observation is that, in the code, we are given a function x[n] which we can determine through what value of x would be given an independent variable n. In short, for every given n we are able to obtained sampled data. Therefore, we conclude that discretetime signal consists of a sequence of quantities that are dependent of n.
In procedure B which give emphasize on unit step signal, gives two different ways of encoding it and the two commands always have a value of one or zero. These give us a knowledge that unit step signal has only two values and those are one or zero. Another observation is that if the independent variable is equal or greater than zero the value for x[n] would be one, otherwise zero. We are also told to encode a command that printouts
unit step signal which is delayed by samples. Through observation we have resolved that the ‘delayed’ is in reference to the origin.
In procedure C, we executed commands that let us observed and understand the characteristics of a unit sample signal or impulse. Like in unit step signal procedure, we are told to type two different ways of command to execute a unit sample signal. But these two are opposing each other, because in the first command it let us know that unit sample signal is a discrete time signal that has a value only at the origin while in the second command it was stated that it has delayed samples. Therefore, we concluded that unit sample signal which only has value at the origin can be delayed.
In procedure D, unit ramp signal can be described as a linear function. Because through this command that we executed, it only shows that the input is the same as the output.
Lastly in procedure E, it shows the characteristics of an exponential signal which the output signal change exponentially with respect to the input signal.