Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Homework 3 (MATLAB Part)

MATLAB Part (To be submitted through Brightspace. Due date: Sept 28, 11:59PM (New York Time) You should submit a zip file that contains:

1.   A report (in .pdf format), includes the MATLAB code you wrote for each problem and result for each problem (in terms of plots and necessary discussion),

2.    Individual .m files. You could use the live script” feature of MATLAB to generate your report. Submit your zip file via Brightspace under “Assignments” .

Please be advised that there are differences between this year’s homework and previous years. So        please follow this year’s instructions and do not submit the homework did by previous years’ students.

Problem 1.

Discrete-time signals f and g are defined as:

f(n) = an u(n)

g(n) = f(−n) = a nu(−n)

Find the convolution:

(n) = (f g)(n)

Plot f, g, and  when a = −0.8. You may use a computer for plotting.

Problem 2.

The N-point moving average filter has the impulse response

0           otherwise

Use the Matlab conv command to compute

y(n) = ℎ(n) ∗ ℎ(n)

for N = 10,20,40, and in each case make a stem plot of ℎ(n) and y(n). What is the general expression for y(n)?

Problem 3.

Convolution of non-causal signals in MATLAB

Note that both of these signals start to the left of n = 0.

f(n) = 36(n + 2) − 6(n − 1) + 26(− 3)

g(n) = u(n + 4) − u(n − 3)

Use MATLAB to make plots of f, g, and f g . Be aware that the conv function increases the length of vectors.

Show the plots of f(n), g(n), x(n), and your Matlab commands to create the plots in your report.

Problem 4.

Using Matlab to plot the output g(t) in the following system.