Convolution using filter: implementation

조회 수: 13 (최근 30일)
gbernardi
gbernardi 2012년 7월 11일
Hello folks, I have a question about the implementation of convolution using filter.
All the time I've implemented linear filtering in MATLAB using the function filter, I've been using the coefficients' representation of the filter, i.e. I used the coefficients a and b, of denominator and numerator respectively.
Anyway, I was thinking that I should be able to obtain the same result if I used the whole representation of the impulse response (whose transfer function provides a and b) as the vector b.
For example, if my impulse response is an exponential like:
g = A*exp(-k*n)
n being my time vector, it can be represented by:
b = A
a = [1 -exp(-k)]
For what I said above, shouldn't it be the same the result of these two operations?
y = filter(b,a,x);
y = filter(g,1,x);
Thanks in advance for your help! ;)

채택된 답변

Honglei Chen
Honglei Chen 2012년 7월 11일
Your b and a represents an IIR filter while your g represents an FIR filter. Depending on what your original coefficients are, one of them is an approximation of the other.
  댓글 수: 2
gbernardi
gbernardi 2012년 7월 11일
Thanks for the answer Honglei.
So, the difference arises from the truncation of the infinite version of the signal, associated to the IIR version, that I implicitly perform when using the finite signal ( g in my case). Am I right?
Honglei Chen
Honglei Chen 2012년 7월 11일
Yes, you are correct.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Frequency Transformations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by