Check impulse responses are inverses using convolution
조회 수: 9 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Signal Generation, Analysis, and Preprocessing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!