can someone please help me with this, I'm really stuck.
here a sample code provide for the matlab:
clear all; close all;
% ---------- (a) ----------
a = 0.7; % attenuation coef.
D = 5; % digital time delay
UnitImpulse = [1 zeros(1,???)]; % creat unit impulse, starting from
n=0;
x = UnitImpulse;
y = filter(1, [1 zeros(1, D-1) -a], x); % help filter, do you know
the usage of filter() now?
n = 0:(length(y)-1); % check length of y[n]
figure
stem(n, y); % is it the same as that in your derivation?
xlabel('n')
title('Impulse response')
% ---------- (b) ----------
% Please comment whether this reverberator can be potentially
implemented in real time and under what condition of a and D this
reverberator is stable.
Modified executable matlab code is given below.
clear all; close all;
% ---------- (a) ----------
a = 0.7; % attenuation coef.
D = 5; % digital time delay
UnitImpulse = [1 zeros(1,100)]; % creat unit impulse, starting from
n=0;
x = UnitImpulse;
y = filter(1, [1 zeros(1, D-1) -a], x); % help filter, do you know
the usage of filter() now?
n = 0:(length(y)-1); % check length of y[n]
figure
stem(n, y); % is it the same as that in your derivation?
xlabel('n');grid on;
title('Impulse response');
RESULT:
The impulse response is sketched below for a = 1.7 and D = 5
The system will go unstable for |a| > 1 because the region of convergence does not contain the unit circle.
For the case of a = 1.5 and D = 5, the impulse response is sketched below.
It is observed that the impulse response is exponentially increasing that makes the system unstable.
For any positive values of D, the system is stable, considering |a| < 1.
% ---------- (b) ----------
The reverberator can be potentially implemented in real time and
for |a|<1 and for any value finite value of D and the
reverberator is stable
Can someone please help me with this, I'm really stuck. here a sample code provide for the matlab...