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

7 vues (au cours des 30 derniers jours)
Lei Zhang
Lei Zhang le 30 Déc 2017
Commenté : Lei Zhang le 31 Déc 2017
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:
"a=mad([1:1:10],1)
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 commentaires
Matt J
Matt J le 31 Déc 2017
Enter this at the command line and tell us the result
>> which -all mad
Lei Zhang
Lei Zhang le 31 Déc 2017
Modifié(e) : Walter Roberson le 31 Déc 2017
Hi Matt,
Thanks for your reply. I got the following:
>> which -all mad;
/Users/leizhang/Documents/MATLAB/Add-Ons/dlmtbx/mad.m
/Applications/MATLAB_R2017b.app/toolbox/stats/distributed/@distributed/mad.m % distributed method
/Applications/MATLAB_R2017b.app/toolbox/stats/stats/mad.m % Shadowed

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 31 Déc 2017
Use pathtool to move /Users/leizhang/Documents/MATLAB/Add-Ons/dlmtbx to after /Applications/MATLAB_R2017b.app/toolbox/stats
Note: after you do that you might have difficulty with running the Dynamic Linear Modeling add-on.
  3 commentaires
Matt J
Matt J le 31 Déc 2017
Lei Zhang,
Since it solved your problem, you should click "Accept" on Walter's answer.
Lei Zhang
Lei Zhang le 31 Déc 2017
Thanks, I have clicked it.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by