How to use filter() if I don't have the transfer function?

4 ビュー (過去 30 日間)
Samuel O'Neill
Samuel O'Neill 2021 年 5 月 17 日
コメント済み: Mathieu NOE 2021 年 5 月 17 日
I have been provided with an impulse response h (vector of length 3) and an input signal x (vector of length 10).
I need to use the filter() function to perform FIR filtering on the input, but the function requires a transfer function as arguments:
From the documentation:
"y = filter(b,a,x) filters the input data x using a rational transfer function defined by the numerator and denominator coefficients b and a."
How do I get values for a and b so that I can use the function?

採用された回答

Mathieu NOE
Mathieu NOE 2021 年 5 月 17 日
hello
you have a FIR filter , and in that case the numerator b is equal to the h impulse response coefficients
the denominator a is equal to 1
  2 件のコメント
Samuel O'Neill
Samuel O'Neill 2021 年 5 月 17 日
Thanks, but i'm not sure what you mean about b.
If I have an impulse response of [0.2 0.3 0.2], then what is b?
Mathieu NOE
Mathieu NOE 2021 年 5 月 17 日
I'm talking about this b and a : "y = filter(b,a,x)
and b = [0.2 0.3 0.2
a = 1

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital Filter Design についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by