Sie sind auf Seite 1von 12

Technological Institute of the Philippines

1338 Arlegui St., Quiapo, Manila

College of Engineering and Architecture


Electronics Department

Experiment #4
Generation of Sequence

2x2 box

Submitted by:
Bobis, Daniel D.

Submitted to:
Engr. Mark Nelson E. Pangilinan

Date:
July 19, 2017
I. Intended Learning Outcomes
1. Familiarize oneself with the basic commands in MATLAB.
II. Discussion

The purpose of this exercise is to familiarize you with the basic commands in
MATLAB for signal generation and for plotting the generated signal. MATLAB has been
designed to operate on data stored as vectors or matrices. For our purposes, sequences
will be stored as vectors. Therefore, all signals are limited to being causal and of finite
length.

III. Learning Activities


Part 1 Discrete-time Signals
A discrete-time signal is a row vector whose elements are the samples taken from a
continuous-time signal. It is of the general form

with the arrow indicates the sample at time index n = 0 which will serve as our reference.
However in MATLAB, we cannot have information about the sample position directly
from this row vector. Therefore, to completely define discrete-time signals in MATLAB,
we need to define two row vectors, one for x(n) and another one for n. For example, to
define the sequence

you issue the command


>> n =[-3:4]; x = [2 1 -1 0 1 4 3 7];
and use the stem function to plot the discrete-time signal, as shown below
>> stem(n,x);grid on;title('Discrete-time signal x(n)')

Part 2 Elementary discrete time signals


The unit sample sequence is defined

and its delayed version is


IV. Questions and Answers
Part 1 Discrete-time Signals
Q1.1. How should the following signals be defined? Plot them on the spaces provided
below
Part 2 Elementary discrete time signals
Q2.1

Q2.2
A. A unit sample sequence of length 10 from 0 n 9
B. The same unit sample sequence in (a) delayed by five samples

C. The same unit sample sequence in (a) delayed by three samples


D. The same unit sample sequence in (a) advanced by five samples

E. The same unit sample sequence in (a) advanced by three samples.


Q2.3 Generate a length-7 unit step sequence and its delayed version of two samples.

Q2.4 Define the following unit step sequences and plot the results in MATLAB

f. A unit step sequence of length 10 from 0 n 9

g. The same unit step sequence in (a) delayed by five samples


h. The same unit step sequence in (a) delayed by three samples

i. The same unit step sequence in (a) advanced by five samples


j. The same unit step sequence in (a) advanced by three samples

Q2.5 Define the following in MATLAB for 0 n 10


a. x(n) = (0.9)n
b. x(n) = (1)n

c. x(n) = (1.9)n
Q2.7 Use the script
>> n =[0:10]; x=exp((2+3i)*n);
and plot the real, imaginary, magnitude and phase of this signal. Plot them on the spaces
provided below. Comment on the outcome of the plots.
Q 2.8 Use MATLAB to define the signal
for 0 n 10 and plot the resulting waveform below.

Q2.9
Random Sequence:

V. Conclusion:

I therefore conclude that this experiment taught me with the basic commands in
MATLAB for signal generation and for plotting the generated signal.

Das könnte Ihnen auch gefallen