필터 지우기
필터 지우기

Butterworth filter design calls bilinear and fails

조회 수: 8 (최근 30일)
Sam Kastner
Sam Kastner 2021년 1월 19일
댓글: Sam Kastner 2021년 1월 22일
I am attempting to set up a simple low-pass Butterworth filter using the following line of code:
[b,a]=butter(2,1/8,'low');
This produces the following error(s):
Error using bilinear
Too many output arguments.
Error in butter>butterImpl (line 130)
[ad,bd,cd,dd] = bilinear(ad,bd,cd,dd,fs);
Error in butter (line 59)
[varargout{1:nargout}] = butterImpl(n,Wn,varargin{:});
As far as I can tell, this is a valid call of bilinear (i.e. five inputs, four outputs). Can anyone replicate this problem? I'm using R2020b Update 3 with the signal processing toolbox. I haven't changed the butter function at all.
  댓글 수: 2
Mathieu NOE
Mathieu NOE 2021년 1월 20일
hi
it works on my R2020b Update 1
>> [b,a]=butter(2,1/8,'low');
>> b
b =
0.0300 0.0599 0.0300
>> a
a =
1.0000 -1.4542 0.5741
Sam Kastner
Sam Kastner 2021년 1월 20일
After a full reinstall, this doesn't seem to be an issue any more.

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

채택된 답변

Adam Danz
Adam Danz 2021년 1월 20일
편집: Adam Danz 2021년 1월 22일
You likely had another file on your Matlab path with the same name as butter. If the error happens again, the following command will show all functions and files of that name and will indicate which one you're using. Remove the path(s) to the functions that don't point to Matlab's butter() or rename the custom files/functions.
which butter -all
should point to \toolbox\signal\signal\butter.m (in r2020b).
  댓글 수: 1
Sam Kastner
Sam Kastner 2021년 1월 22일
Yes, serves me right for blindly adding a folder of third party functions to my path. Thanks!

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by