Butterworth filter design calls bilinear and fails

5 Ansichten (letzte 30 Tage)
Sam Kastner
Sam Kastner am 19 Jan. 2021
Bearbeitet: Shiyu am 27 Sep. 2025 um 3:39
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.
  3 Kommentare
Sam Kastner
Sam Kastner am 20 Jan. 2021
After a full reinstall, this doesn't seem to be an issue any more.
Shiyu
Shiyu am 27 Sep. 2025 um 3:38
Bearbeitet: Shiyu am 27 Sep. 2025 um 3:39
I got the same issue in my university's cluster, I double check the "bilinear.m" and "butter.m" function, both in toolbox/signal/signal/
University Clutser MATLAB Version is R2024a
I also run MATLAB R2024a on my local device
Local device is completely fine, but university cluster always goes wrong!
I double check the two functions in my local and uni cluster, the bilinear.m is completely the same
while the 'butter.m' is different

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Adam Danz
Adam Danz am 20 Jan. 2021
Bearbeitet: Adam Danz am 22 Jan. 2021
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 Kommentar
Sam Kastner
Sam Kastner am 22 Jan. 2021
Yes, serves me right for blindly adding a folder of third party functions to my path. Thanks!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by