error using resample. too many input arguments

16 ビュー (過去 30 日間)
sachin garg
sachin garg 2017 年 10 月 25 日
コメント済み: Cam Salzberger 2017 年 10 月 25 日
Hi, I tried using resample on a Mac device and I am getting the following error but I do not get any error on windows device.
Error using resample Too many input arguments.
kl = (B*log2(1+1/d));
[Ures_LogP_absCQT, Ures_FreqVec] = resample(LogP_absCQT,FreqVec,1/(fmin*(2^(kl/B)-1)),1,1,'spline');
  2 件のコメント
KSSV
KSSV 2017 年 10 月 25 日
Read the documentation of resmaple ..you have input many arguments then it needs.
sachin garg
sachin garg 2017 年 10 月 25 日
but it works fine in windows.

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

採用された回答

Cam Salzberger
Cam Salzberger 2017 年 10 月 25 日
編集済み: Cam Salzberger 2017 年 10 月 25 日
Hello Sachin,
There are actually six different functions or methods called resample across five products in the current release of MATLAB:
Of these, only the Signal Processing Toolbox function allows for six input arguments, the last being the method. My guess is that you have the Signal Processing Toolbox installed on your Windows computer, but not on your Mac. Or you have different releases of MATLAB on the computers, which may have had different specifications for how to input to your desired resample function. Or you have a user-defined resample function somewhere on your path on the Mac, which shadows the Signal Processing Toolbox implementation.
One way you can tell is to use which with the input arguments to see which implementation MATLAB will try to call:
which resample(LogP_absCQT,FreqVec,1/(fmin*(2^(kl/B)-1)),1,1,'spline')
Or use this to see all implementations installed, and the order of preference:
which -all resample
-Cam
  2 件のコメント
sachin garg
sachin garg 2017 年 10 月 25 日
THANK YOU SO MUCH!!
Cam Salzberger
Cam Salzberger 2017 年 10 月 25 日
No problem. Happy to help.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by