Turns out that the "cellstr" and/or "cell/strcat" in that error message appear to be related to a script cellstrcat.m that I downloaded as a folder of routines from a scientist at another institution. If I don't try to add his folder to my path, I'm good. I've shot him an email to give him a heads up.
Why strange savepath errors when I add folders to my path?
4 次查看(过去 30 天)
显示 更早的评论
I just installed the following on a MacBook Pro (OSX 10.11.6): MATLAB 9.2, Curve Fitting Toolbox 3.5.5, Statistics and Machine Learning Toolbox 11.1, Symbolic Math Toolbox 7.2 (Installation folder: /Applications/MATLAB_R2017a.app)
• Tried to add folders via the "Set Path" button & window. When I hit the "Save" button, I get a new window with the following error message: ----- MATLAB cannot save changes to the path. The path file, pathdef.m, might be read-only or might be in a folder for which you do not have write access. You can save pathdef.m to a different location. For MATLAB to use that pathdef.m in future sessions, save it in your MATLAB startup folder (the folder from which you start MATLAB). Do you want to save pathdef.m to another location? -----
When I hit the "Yes" button, and choose ~/Documents/MATLAB, I get a warning sound and the same window.
• Here are the results of some command window items:
>> savepath
Error using cellstr (line 24)
S must be 2-D.
Error in cell/strcat (line 17)
varargin{i} = cellstr(varargin{i});
Error in savepath>matlabrootify (line 253)
dirnames(~mlr_dirs) = strcat(' ''',dirnames(~mlr_dirs));
Error in savepath (line 130)
all_path_lines = matlabrootify(all_path_lines);
>> which -all pathdef.m
/Applications/MATLAB_R2017a.app/toolbox/local/pathdef.m
>> restoredefaultpath; savepath;
[no Command Window messages pop up]
• If I manually add a folder to my path and again issue "savepath", I get the error stream above. If I use the button to add a folder to my path and try to save, I have the same error window as above.
What's going on, and how do I fix it?!
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!