retrieving the impulse response of a function using freqz (not impz)
조회 수: 5 (최근 30일)
이전 댓글 표시
Can anyone help me retrieve the impulse response of a filter by USING freqz command and NOT impz command? I know that when you use freqz, its answer will be the H(W). So by using IDFT on H(W) I can retrieve h(n). But how do you do that?
Example I want 100 samples of the impulse response of the filter described by the lccde y(n)-3y(n-1) = x(n). I would input [H,~] = freqz(1,[1 -3],100,'whole'). From here, H output is H(w) right? So I would use [Y] = ifft(H',100) function to inverse fourier the H(w) to h(n) using 100 samples to obtain 100 samples. But checking the answer using [i,~] = impz(1,[1 -3],100) would net a very FAR result. Please help me, this would really help me pass my subject in college.
댓글 수: 0
답변 (1개)
Daniel kiracofe
2016년 12월 3일
I suspect your problem is that the system you are trying to study is unstable. i.e. the pole lies outside the unit circle, so the impulse response grows exponentially without bound. I think if you tried something like [H,~] = freqz(1,[1 -0.3],100,'whole') instead, which is a stable system, you would find that it would match better with impz. This page might help explain it a little better. http://ptolemy.eecs.berkeley.edu/eecs20/lectures/chapter12part1student.pdf
Also I don't think you need the transpose. ifft(H,100) should be good.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!