필터 지우기
필터 지우기

Convert a digital filter to transfer function

조회 수: 7 (최근 30일)
Sandi J
Sandi J 2018년 9월 6일
편집: Stephan 2018년 9월 6일
I have a coefficients of FIR filter ,found it by 'fir1' function, in general, i want to convert a digital filter to transfer function with apply this formula :
The method :
Design a 48th-order FIR filter passband , with a cutoff frequency w=[0.35 0.65]. Compute the coefficients of the equivalent transfer function.
% Coefficients of fir filter
c = fir1(48,[0.35 0.65]);
%Filter Transfer Function
[b,a] = tf(c);
The error found:
Error using tf
Too many output arguments.
How can i solve this problem? how can i find a transfer function of fir filter with this specifications?

채택된 답변

Stephan
Stephan 2018년 9월 6일
Hi,
tf has only one output - use:
% Coefficients of fir filter
c = fir1(48,[0.35 0.65]);
%Filter Transfer Function
trans_fun = tf(c);
Best regards
Stephan
  댓글 수: 2
Sandi J
Sandi J 2018년 9월 6일
Thank you for your reply ,but what is the difference between this case and the case in this page https://www.mathworks.com/help/signal/ref/tf.html
Stephan
Stephan 2018년 9월 6일
편집: Stephan 2018년 9월 6일
I think it is the type of input. The result of fir1 is a row vector which is input for tf.
The input of the link you provided is a digital filter object.
I think the tf function make a case distinction and changes behavior depending on the input type.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by