Every time I start MATLAB I receive: 'Attempt to execute SCRIPT path as a function'
显示 更早的评论
So I'm working on a project that involves programming within a folder called myProject and adding the path of another folder called projectFunctions. I did this using the addpath command and saved addpath as a .m file within the myProject folder. Ever since I did this I have been getting errors when I start MATLAB. I tried reinstalling it, but it's not working.
The following is what I get when I start the program:
Warning: Name is nonexistent or not a directory: C:\Users\Gabriel
Quintero\AppData\Local\Temp\Editor_vxdxq
Warning: Initializing Java preferences failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup, which should
be resolved as soon as possible. Error detected was:
MATLAB:scriptNotAFunction
Attempt to execute SCRIPT path as a function:
C:\Program Files\MATLAB\R2020a\path.m
Attempt to execute SCRIPT path as a function:
C:\Program Files\MATLAB\R2020a\path.m
Error in rmi.isInstalled
Error in rmiml.visibleInToolstrip
Attempt to execute SCRIPT path as a function:
C:\Program Files\MATLAB\R2020a\path.m
Error in rmi.isInstalled
Error in rmiml.visibleInToolstrip
回答(1 个)
Steven Lord
2020-4-12
1 个投票
Rename or remove the file C:\Program Files\MATLAB\R2020a\path.m. It is preventing MATLAB from calling the path function included in MATLAB.
You probably shouldn't be saving your own files inside the MATLAB root directory (returned by the matlabroot function) or inside "c:\Program Files" anyway.
类别
在 帮助中心 和 File Exchange 中查找有关 Search Path 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!