error in "bandpass" function ("not enough input arguments")

11 ビュー (過去 30 日間)
Carolina Fernandez
Carolina Fernandez 2021 年 3 月 19 日
コメント済み: Carolina Fernandez 2021 年 3 月 21 日
Hello,
When I run the "signal/BandpassFilteringOfTonesExample" I get an error that reads:
"Error using bandpass
Not enough input arguments."
Thank you,
Carolina
  2 件のコメント
Walter Roberson
Walter Roberson 2021 年 3 月 20 日
what shows up for
which -all bandpass
Carolina Fernandez
Carolina Fernandez 2021 年 3 月 20 日
編集済み: Carolina Fernandez 2021 年 3 月 20 日
I get the following:
/Downloads/amtoolbox-full-0/code/thirdparty/sfs/SFS_general/bandpass.m
/Applications/MATLAB_R2021a.app/toolbox/signal/signal/bandpass.m % Shadowed
It seems like it is getting shadowed by another function. How can I point to the one from the signal processing toolbox?
Thank you

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

採用された回答

Walter Roberson
Walter Roberson 2021 年 3 月 21 日
編集済み: Walter Roberson 2021 年 3 月 21 日
You appear to have installed Auditory Monitoring Toolbox from https://sourceforge.net/projects/amtoolbox/files/
You will need to move the directory /Downloads/amtoolbox-full-0 to the end of your MATLAB path (use pathtool for that)
Or else go into the code and rename /Downloads/amtoolbox-full-0/code/thirdparty/sfs/SFS_general/bandpass.m to /Downloads/amtoolbox-full-0/code/thirdparty/sfs/SFS_general/sfsbandpass.m and edit all the code under /Downloads/amtoolbox-full-0/code/thirdparty/sfs that refers to bandpath to instead refer to sfsbandpass . Which is a nuisance. But even if you do move the toolbox to the end of your MATLAB path, when you go to use the toolbox, unless you did the rename, it would probably end up using the MATLAB bandpass instead of its own.
In some cases, if the only calls to bandpass in the toolbox are from files in the SFS_general directory, then instead of doing the renaming, you could create a subdirectory named private in the directory and move /Downloads/amtoolbox-full-0/code/thirdparty/sfs/SFS_general/bandpass.m to /Downloads/amtoolbox-full-0/code/thirdparty/sfs/SFS_general/private/bandpass.m
  1 件のコメント
Carolina Fernandez
Carolina Fernandez 2021 年 3 月 21 日
Thanks very much for your help! I ended up renaming the bandpass function from the AMT toolbox since the AMT scripts I’m using don’t ever call that function.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by