Anda di halaman 1dari 11

EXPERIMENT NO.

2
ELEMENTARY DISCRETE TIME SIGNALS

OBJECTIVES:

To generate and plot unit sample, unit step sequence, unit ramp and exponential
discrete-time signals.
To analyze the characteristics of a unit sample, unit step sequence, unit ramp and
exponential discrete-time signals.

PROCEDURE A: DISCRETE-TIME 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 Discrete-Time Signal','n','x[n]');

Figure A-1

2. Observe and draw the figure generated.

Figure A-2
3. Re-type 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).

Figure A-3
OBSERVATIONS:
1. What type of discrete-time 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 Unit-Step Signal','n','u[u]');

Figure B-1
2. Change L=4; to L=10; and then re-type again the other syntax. What is the result?
(You can use separate sheet paper for your explanation and to show the result).

Figure B-2

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 B-3
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 B-4
5. Type the following command and then compare it to the result of procedure B-1.

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 Unit-Step Signal','n','u[n]');

Figure B-5

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 Unit-Step 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 B-6
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 B-7
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 Unit-Sample Sequence','n','x[n]');
mtlb_axis([-4 4 0 1.2]);

Figure C-1
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 Unit-Sample Sequence','n','s[n]')
mtlb_axis([-4 4 0 1.2]);

Figure C-2

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 discrete-time 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 C-3

Figure C-4

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 Unit-Ramp Signal','n','x[n]')

Figure D-1

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 D-2

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 E-1

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 E-1

ANSWERS TO THE REPORT:


1. Make a program of a unit step discrete-time 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 discrete-time signals, we first, understand the
characteristic of a discrete-time 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
discrete-time 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 print-outs

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.

Anda mungkin juga menyukai