Check impulse responses are inverses using convolution

9 ビュー (過去 30 日間)
Ian Downie
Ian Downie 2018 年 10 月 26 日
編集済み: Ian Downie 2018 年 10 月 26 日
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 件)

カテゴリ

Help Center および File ExchangeSignal Generation, Analysis, and Preprocessing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by