Where is startup.m supposed to be?

后端 未结 6 2018
旧时难觅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:31

    The best method, I find, is this. Let's say you want MATLAB to start up in mystartupdir, and you've placed startup.m in that directory.

    On Windows, make a shortcut icon to MATLAB, then right-click on it and select Properties. Edit the field Start In. Now, use this icon whenever you want to start MATLAB.

    On other platforms, you can run MATLAB with the -sd flag to specify the startup directory:

    matlab -sd mystartupdir

    If you don't specify a startup directory, MATLAB will use the default specified by the userpath command. You can place your startup.m file there.

提交回复
热议问题