path and user preferences not saved between Matlab sessions

1 次查看(过去 30 天)
I run Matlab on Mac by directly calling the binary in this location:
/Applications/MATLAB_R2017b.app/bin/matlab
Unfortunately Matlab is not saving my path settings in between sessions even when I type "savepath". It also does not seem to save my user settings in the Preferences window. It seems like I have two pathdef files and Matlab might be editing the wrong one? How do I fix this? Another explanation is that Matlab is resetting my path file every time I close the program and call a new instance of Matlab.
>> which pathdef -all
/Users/stockmann/Documents/MATLAB/pathdef.m
/Applications/MATLAB_R2017b.app/toolbox/local/pathdef.m % Shadowed
  3 个评论
Jason
Jason 2018-1-29
编辑:Jason 2018-1-29
Thank you for your reply. I'm running Matlab locally on my Mac. And yes, I have write access to the preferences folder prefdir. When I run savepath, it returns a 0 "file saved successfully".
Jan
Jan 2018-1-31
@Jason: If savepath runs successfully, it has written the changes to /Users/stockmann/Documents/MATLAB/pathdef.m - please check this manually. Now the changes here are not applied, when you restart Matlab - correct? Then Matlab prefers "/Applications/MATLAB_R2017b.app/toolbox/local/pathdef.m" at startup instead of the user defined version. Then the actual problem is the startup folder of Matlab.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by