Check impulse responses are inverses using convolution
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have written the following code to check that h1[n] and g[n] are inverses of each other by generating an impulse when I convolute them. However, I'm not currently getting an impulse.
The original transfer function is H(z) = (1-2.5*z^(-1)+z^(-2))/(1-z^(-1)+0.7z^(-2));
function part2b
n=-20:0;
g1 = -1.8*(2).^(n-1);
n=1:20;
g2=-0.3*(0.5).^(n-1);
g=[g1 g2];
g(21)=g(21)+1;
n=0:20;
h1 = 0.82*exp(1i*2.72)*(0.84*exp(1i*0.93)).^(n-1) + 0.82*exp(1i*-2.72)*(0.84*exp(1i*-0.93)).^(n-1);
h1(1)=h1(1)+1;
y=conv(h1,g);
x = -20:40;
stem(x,y)
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Signal Generation, Analysis, and Preprocessing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!