Filter transfer function using coefficients

I have with me a low pass filter with coefficients given by , where reprents the filter reference frequency, k runs from -N/2 to N/2, where N is the order of the filter and h(k) is a hamming window function. The value of Coeff(0) is replaced by 1 when k=0. Now that i have my filter coefficients readily available with me, if i wish to find the transfer function of the same filter in order to find the amplitude and phase response of the filter. How do i do so. I guess whole point of my question is to how one can find the transfer function of a filter if the filter coefficients are given. Is there a command for that in matlab, or something else?

 採用された回答

Star Strider
Star Strider 2019 年 8 月 31 日

0 投票

Since you have the (a,b) vectors for your filter, use the freqz function to create the Bode plot from them. Your filter appears to be discrete. For a continuous filter, use the freqs function (linked to at the end of that page).

4 件のコメント

mir  khadim
mir khadim 2019 年 9 月 3 日
if i want to calculate the magnitude and phase response of the above mentioned filter mathematically, what should i do. How should i go about the whole process?
Star Strider
Star Strider 2019 年 9 月 3 日
The easiest way would be to give your system a random signal. Use the randn function to produce the vector and use the filtfilt function to do the filtering, then take the fft of both the input signal and the output signal. Divide the fft of the output signal by the fft of the input signal to produce the transfer function, then plot the result as a function of frequency, from 0 Hz to the Nyquist frequency. Use the abs function to calculate the magnitude and the angle function to calculate the phase.
mir  khadim
mir khadim 2019 年 9 月 4 日
Thanks a lot. it worked.
Star Strider
Star Strider 2019 年 9 月 4 日
As always, my pleasure.

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

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by