MATLAB Answers

Lei Zhang

Got "Error using mad Too many input arguments." in MATLAB 2017b

Lei Zhang
さんによって質問されました 2017 年 12 月 30 日
最新アクティビティ Lei Zhang
さんによって コメントされました 2017 年 12 月 31 日
Hi All,
I was trying to use the function ksdensity, but I got the following error message
"Error using mad
Too many input arguments.
Error in mvksdensity>apply_censoring_get_bandwidth (line 314)
sig = mad(ty,1,1) / 0.6745;
Error in mvksdensity (line 91)
[ty,ymax,weight,u,foldpoint,maxp] = apply_censoring_get_bandwidth(cens,yData,ty,n,ymax,weight,u,d);
Error in ksdensity (line 222)
[fout,xout,u,plottype] = mvksdensity(yData,xi,varargin{:});"
I then tried to test whether it is because of mad function, and I did the following:
Error using mad
Too many input arguments."
The ksdensity function works perfect on MATLAB 2015b a few months ago. I didn't change anything in the program since then, but it doesn't work now. Does anyone meet the same problem and know how to fix this? Any suggestions would be much appreciated.
Happy holidays

  2 件のコメント

Matt J
2017 年 12 月 31 日
Enter this at the command line and tell us the result
>> which -all mad
Lei Zhang
2017 年 12 月 31 日
Hi Matt,
Thanks for your reply. I got the following:
>> which -all mad;
/Applications/ % distributed method
/Applications/ % Shadowed

サインイン to comment.


1 件の回答

回答者: Walter Roberson
2017 年 12 月 31 日

Use pathtool to move /Users/leizhang/Documents/MATLAB/Add-Ons/dlmtbx to after /Applications/
Note: after you do that you might have difficulty with running the Dynamic Linear Modeling add-on.

  3 件のコメント

Lei Zhang
2017 年 12 月 31 日
Hi Walter,
Thanks a lot! This solves my problem!
Happy new year!
Matt J
2017 年 12 月 31 日
Lei Zhang,
Since it solved your problem, you should click "Accept" on Walter's answer.
Lei Zhang
2017 年 12 月 31 日
Thanks, I have clicked it.

サインイン to comment.

Translated by