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

26 Ansichten (letzte 30 Tage)
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

Antworten (1)

Abhishek Chakram
Abhishek Chakram am 20 Dez. 2023
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

Kategorien

Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by