Error using internal.stats.parseArgs (line 42) Unable to resolve the name statslib.i​nternal.pa​rseArgs. Error in optimizableVariable (line 92) [Type, Transfor

20 ビュー (過去 30 日間)
function this = optimizableVariable(Name, Range, varargin)
if nargin > 0
% Convert String inputs to char/cellstr
Name = convertStringsToChars(Name);
Range = convertStringsToChars(Range);
[varargin{:}] = convertStringsToChars(varargin{:});
this.PrivName = Name;
this.PrivRange = Range;
ArgNames = {'Type', 'Transform', 'Optimize'};
Defaults = {'real', 'none', true};
[Type, Transform, Optimize, SetFlags] = internal.stats.parseArgs(...
ArgNames, Defaults, varargin{:});
this.TypeSet = SetFlags.Type;
this.PrivType = Type;
this.PrivTransform = Transform;
this.PrivOptimize = Optimize;
this = checkAndFill(this);
end
end

回答 (1 件)

Abhishek Chakram
Abhishek Chakram 2023 年 12 月 20 日
Hi ke yi,
It is my understanding that you are facing difficulty in resolving the error in your code. The error message indicates that MATLAB is unable to resolve the name `statslib.internal.parseArgs`. This could be due to several reasons such as the Statistics and Machine Learning Toolbox not being installed, a licensing issue or a missing file in the installation.
Here are few steps to troubleshoot the same:
1. Ensure that the Statistics and Machine Learning Toolbox is installed by running the “ver” command. This will list all the installed toolboxes. Look for "Statistics and Machine Learning Toolbox" in the list.
2. Make sure that you have a valid license for the Statistics and Machine Learning Toolbox by running the following command:
license('test', 'Statistics_Toolbox')
%If this returns 0, it means you do not have a valid license for the toolbox.
3. Uninstall and reinstall the Statistics and Machine Learning Toolbox again to cater the possibility of a missing file in the installation
You can refer to the following documentation to know more about the functions used:
Best Regards,
Abhishek Chakram

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by