Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

One context in which discrete-time LTI systems are used is to model sound effect

ID: 2085254 • Letter: O

Question

One context in which discrete-time LTI systems are used is to model sound effects. In this part of the lab you will develop the impulse reponse corresponding to a simple 'echo' effect. Consider a discrete-time LTI system with impulse response of the form:

h[n] = [n] + [n D]

where D is a positive integer and 0 < < 1. If the input to this system is a signal x, the output is the the signal

(x h)[n] = x[n] + x[n D].

So the system output consists of x itself, together with an echo, which is scaled down by a factor of

Write a MATLAB function echoIR(D,alpha) that creates an impulse response with given inter-echo delay D (in samples), given amplitude decay alpha (scalar between 0 and 1). The output should be a pair of row vectors of length D + 1, one corresponding to the signal values, and another to the associated time indices

Let D = 6144, and let alpha = 0.5 Construct the corresponding impulse response using your function [h, nh] = echoIR(D,alpha)

Explanation / Answer

%echolR.m

function [h,nh ] = echolR( D,alpha )

nh = 0:1:D+100;
h = (nh==0).*1 + (nh==D).*alpha;
return;
end

%echolRcalling_function.m

clc;
close all;
clear all;

figure

[h,nh] = echolR(6144,0.5);
subplot(3,1,1);
stem(h);
title('h(n)');

xn = sin(2*pi*nh);
subplot(3,1,2);
stem(xn);
title('x(n)');

yn = conv(h,xn);
subplot(3,1,3);
stem(yn);
title('y(n)');

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote