Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

MATLAB Project 1 - Discrete Structures - Fall 2003 | EEGR 322, Study Guides, Projects, Research of Electrical and Electronics Engineering

Material Type: Project; Class: Discrete Systems; Subject: Electrical Engineering; University: Morgan State University; Term: Fall 2003;

Typology: Study Guides, Projects, Research

Pre 2010

Uploaded on 08/07/2009

koofers-user-xtj
koofers-user-xtj 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
EEGR 322: Discrete Systems
FALL 2003
Project 1
Due date: Monday, October 13, 2003
In this project, all the questions are supposed to be answered using MATLAB. Some basic infor-
mation on the use of MATLAB for the study of discrete signals can be obtained in the following
web sites
http://www.eece.unm.edu/signals/ and http://www.jhu.edu/˜signals/
When you are asked to sketch the graph of a signal, do not forget to clearly label the
axis.
Problem 1
Consider the two discrete-time signals x[n] and h[n] given by
x[n]=(1
2)nu[n4],
h[n]=4nu[2 n].
For the sake of this problem, assume that x[n] and h[n] are defined for 10 n10.
1. Use MATLAB to define x[n].
2. Use MATLAB to define h[n].
3. Use the appropriate MATLAB function to compute y[n] = x[n]h[n] (for which values of n
is y[n] defined?).
4. On the same page sketch the graphs of x[n], h[n] and y[n] (hint: use the subplot command).
Problem 2
Consider the two discrete-time signals x[n] and h[n] given by
x[n] = u[n]u[n50],
h[n]=5δ[n]+4δ[n1] + 3δ[n2] + 2δ[n3]+δ[n4].
For this particular problem, the convolution sum can be expressed as
y[n] = h[n]x[n] =
M1
X
k=0
h[k]x[nk], where M = 5.
We want to evaluate the above sum for any value of n. If we consider the following vectors
H=
h[0]
h[1]
.
.
.
h[M1]
and X[n] =
x[n]
x[n1]
.
.
.
x[nM+ 1]
pf2

Partial preview of the text

Download MATLAB Project 1 - Discrete Structures - Fall 2003 | EEGR 322 and more Study Guides, Projects, Research Electrical and Electronics Engineering in PDF only on Docsity!

EEGR 322: Discrete Systems FALL 2003 Project 1 Due date: Monday, October 13, 2003

In this project, all the questions are supposed to be answered using MATLAB. Some basic infor- mation on the use of MATLAB for the study of discrete signals can be obtained in the following web sites

http://www.eece.unm.edu/signals/ and http://www.jhu.edu/˜signals/

When you are asked to sketch the graph of a signal, do not forget to clearly label the axis.

Problem 1 Consider the two discrete-time signals x[n] and h[n] given by x[n] = (− 12 )nu[n − 4], h[n] = 4 nu[2 − n]. For the sake of this problem, assume that x[n] and h[n] are defined for − 10 ≤ n ≤ 10.

  1. Use MATLAB to define x[n].
  2. Use MATLAB to define h[n].
  3. Use the appropriate MATLAB function to compute y[n] = x[n] ∗ h[n] (for which values of n is y[n] defined?).
  4. On the same page sketch the graphs of x[n], h[n] and y[n] (hint: use the subplot command).

Problem 2 Consider the two discrete-time signals x[n] and h[n] given by x[n] = u[n] − u[n − 50], h[n] = 5 δ[n] + 4δ[n − 1] + 3δ[n − 2] + 2δ[n − 3] + δ[n − 4]. For this particular problem, the convolution sum can be expressed as

y[n] = h[n] ∗ x[n] =

M∑ − 1 k=

h[k]x[n − k], where M = 5.

We want to evaluate the above sum for any value of n. If we consider the following vectors

H =

   

h[0] h[1] ... h[M − 1]

    and^ X[n] =

   

x[n] x[n − 1] ... x[n − M + 1]

   

then the sum can be written as an inner product

y[n] = HT^ X[n].

  1. What is the range of values of n for which y[n] is not zero?
  2. Use MATLAB to define the signal h[n].
  3. Use MATLAB to define the vector H.
  4. Use MATLAB to define the signal x[n] for − 4 ≤ n ≤ 53.
  5. For all the indices n as defined by the range of Question 1, use MATLAB to define the vector X[n] and to calculate y[n] = HT^ X[n] (use a loop to compute the sum).
  6. On the same page sketch the graphs of x[n], h[n] and y[n] (hint: use the subplot command).