Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: changing the default startup folder for MATLAB on Mac

$
0
0


<rbj@audioimagination.com> wrote in message
news:d3c4931a-1e71-4f9d-80cc-138e13ecc303@googlegroups.com...
>
> so the outa-box default is /Users/a_specific_user/Documents/MATLAB
>
> i remember when installing it asked me about this and i said okay about
> the default believing that i could easily change it later.

I don't think the Installer asks you about the startup directory. I know it
asks you where to install MATLAB, and that indeed is not easy to change
after-the-fact (without reinstalling.) On certain platforms it also asks you
if you want to create symbolic links and where it should create them if you
do.

I just looked through the Installation documentation to confirm that. None
of the steps shown discuss the startup folder.

http://www.mathworks.com/help/install/index.html

> this page is no help whatsoever:
>
> http://www.mathworks.com/help/matlab/matlab_env/changing-the-startup-folder.html

What happened when you tried using the USERPATH function? Did MATLAB not
start in that directory when you restarted it? If it did not, and if the
directory exists, and if you have the necessary permissions to be in that
directory, that sounds like a bug.

> nor is this page:
>
> http://www.mathworks.com/help/matlab/matlab_env/startup-options.html

While there is no startup option like -startupFolder (which is what I'm
guessing you were hoping to find on that page) you can alias "matlab" or
"startmatlab" or something similar to:

/pathToMATLABBinary/matlab -r "cd newDesiredStartupDirectory"

That will run the CD command as the first instruction (after matlabrc and
startup.m) when MATLAB starts.

> nor is this page:
>
> http://www.mathworks.com/help/matlab/matlab_env/matlab-startup-folder.html
>
> nor is this page helpful:
>
> http://www.mathworks.com/help/matlab/ref/userpath.html
>
>
> why cannot MATLAB just have this as part of the Preferences function?

That seems like a reasonable enhancement request. I'll add it to the
enhancement database.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Viewing all articles
Browse latest Browse all 19628

Trending Articles