Where is startup.m supposed to be?

后端 未结 6 2086
旧时难觅i
旧时难觅i 2021-01-31 03:13

I\'ve been chasing the answer to this question in the MATLAB documentation for a long time...

For example, at the bottom of

http://www.mathworks.com/help/matlab/

6条回答
  •  自闭症患者
    2021-01-31 03:24

    On Mac OS X, you may put your startup.m file in /matlabrootfolder/toolbox/local/. For example, this path might look like the following for Matlab 2012: /Applications/MATLAB_R2012a.app/toolbox/local/.

    To prevent the file from being removed after upgrading Matlab, you may use a symlink to the file. If your startup file is stored at $HOME/myDir/startup.m, for example (in Bash):

    cd /Applications/MATLAB_R2012a.app/toolbox/local/
    ln -s ~/myDir/startup.m .
    

    Reference: http://www.mathworks.com/help/matlab/matlab_env/startup-options.html

提交回复
热议问题