Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

ECE 3300 MATLAB Assignment 3 This assignment explains how to use MATLAB to perform the convolution of two signals in discrete time and in continuous time. Convolution in MATLAB Given two vectors...

1 answer below »
ECE 3300
MATLAB Assignment 3
This assignment explains how to use MATLAB to perform the convolution of two signals in
discrete time and in continuous time.
Convolution in MATLAB
Given two vectors x and y, the command z=conv(x,y) assigns to z a vector consisting of the
convolution of x and y. For example if, x[n] = δ[n]+δ[n−1] and y[n] = δ[n]+2δ[n−1], the convo-
lution is (x∗h)[n] = y[n]+y[n−1] = δ[n]+2δ[n−1]+δ[n−1]+2δ[n−2] = δ[n]+3δ[n−1]+2δ[n−2].
Using MATLAB, If x=[1 1] and y=[1 2], then z=conv(x,y) gives output [1 3 2].
Convolution of Discrete-Time Signals
The command conv does not keep track of time values, so we need to do this separately. We have
learned that if x[n] is “on” from n = a1 to n = c1 and y[n] is “on” from n = a2 to n = c2, then
(x ∗ h)[n] is “on” from n = a1 + a2 to n = c1 + c2. Given that x[n] is represented in MATLAB
y n 1=a 1:c 1 and x and that y[n] is represented by n 2=a 2:c 2 and y, z[n] = (x ∗ h)[n] is
obtained via n=n 1(1)+n 2(1):n 1(end)+n 2(end) and z=conv(x,y).
PROBLEM STATEMENT: PART ONE
In this problem we explore the claim that many signals. when convolved with themselves ove
and over, start to resemble a bell-shaped curve.
1. Let x[n] = u[n]− u[n− 50]. Let y[n] = (x ∗ x)[n], let z[n] = (y ∗ y)[n], let w[n] = (z ∗ z)[n],
and let v[n] = (w ∗ w)[n]. Plot each of these signals on separate graphs using stemplot as
per the instructinos for discrete-time plots in the first Matlab assignment. Note that each
graph should use appropriate (different) horizontal and vertical ranges so that the resulting
shapes are clearly seen, each with height taking up most of the vertical plot space.
2. Repeat this process with the signal x[n] = n(u[n] − u[n− 50]).
Convolution of Continuous-Time Signals
For continuous time signals x(t) and y(t) we can approximate the convolution integral as a
sum of rectangles with width b, where b is the time between samples. Let x[m] = x(mb) and
y[m] = y(mb), and set t = nb. Then
[x ∗ y](t) =
∫ ∞
−∞
x(τ)y(t− τ)dτ
=
∫ ∞
−∞
x(τ)y(nb− τ)dτ

∞∑
m=−∞
x(mb)y(nb−mb)
=
∞∑
m=−∞
x[m]y[n−m]
Apart from the final multiplication by b, the sum is readily implemented with the command
conv. Thus, if x(t) is implemented in MATLAB via t 1=a 1:b:c 1 and x and y(t) is imple-
mented via t 2=a 2:b:c 2 and y, then z(t) = [x ∗ y](t) can be implemented (approximately) via
the following commands: t=t 1(1)+t 2(1):b:t 1(end)+t 2(end) and z=conv(x,y).*b.
1
PROBLEM STATEMENT: PART TWO
In all parts of this problem use a sampling time of 0.01.
1. Use Matlab to determine the convolution of x(t) = (u(t − 7) − u(t − 10)) with h(t) =
(u(t− 4) − u(t− 9)) and plot the result.
2. Compute this convolution by hand, and give the resulting expression. Plot the resulting
expression and the previous result on a single graph, verifying that the answers are ap-
proximately the same. (Scan your hand-computation and attach to the PUBLISH pdf
file(s).)
2
Answered 1 days After Oct 12, 2022

Solution

Pradhuman answered on Oct 12 2022
47 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here