Issue: Unable to resolve the name coder.internal.rnd
27 次查看(过去 30 天)
显示 更早的评论
Dear all,
I am runnunig matlab 2019b on a linux cluster.
I am getting the following issue after launching matlab (with matlab -nodisplay) and running a simple function. I guess this is something related to the path, and I also could not get the first warning, since there is no file called randg in the start path.
Any help appreciated.
Patrick
< M A T L A B (R) >
Copyright 1984-2019 The MathWorks, Inc.
R2019b (9.7.0.1190202) 64-bit (glnxa64)
August 21, 2019
Warning: Function randg has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
To get started, type doc.
For product information, visit www.mathworks.com.
>>
>> y = exprnd(10,50,1);
Unable to resolve the name coder.internal.rnd.
Error in exprnd (line 10)
r = coder.internal.rnd('exprnd',mu,varargin{:});
3 个评论
Walter Roberson
2020-6-8
you need the Statistics And Machine Learning Toolbox.
You should not add the path you added: it is only for use in MATLAB Coder.
回答(2 个)
Steven Lord
2020-6-9
You should not try to add directories in MathWorks products under matlabroot to the path. If they're supposed to be on the path, they should be added to the path automatically by the installer and/or Add-On Manager when the toolbox is installed.
If the path gets corrupted to the point where MATLAB isn't working, restoredefaultpath then add the directories containing your files to the path.
The files in that eml subdirectory, I believe, are intended only to be used by MATLAB Coder when generating code from Statistics and Machine Learning Toolbox function. But by adding that directory to the path, you make them available to everyone.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Naming Conventions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!