MATLAB: Is there a way to set up the current directory browser in MATLAB 7.8 (R2009a) so that the down triangle in the short cut browser shows custom directories

MATLAB

I would like to set up my current directory browser so that when I start MATLAB the directories I navigate to most frequently are already listed in the short cut browser bar (accessed using the down triangle in the current directory browser.

Best Answer

The short cut browser displays the most recently accessed directories. If you navigate to these directories using the CD command when MATLAB starts up, they can be added to your short cut browser.
1) Open MATLAB.
2) Type "edit startup.m" at the MATLAB command prompt. Note that the "startup.m" file should be located in your startup directory. If the file does not exist, the edit command will create the file in your startup directory. If the file does exist, please make sure that it is located in your startup directory.
3) Insert the following lines into your "startup.m" file:
% save the current directory:
cwd = pwd;
% CD into custom directories
cd my_custom_directory1
cd my_custom_directory2
cd my_custom_directory3
% return to the startup directory for your MATLAB session
cd(cwd)
4) Save "startup.m".
The next time you start MATLAB, the specified custom directories will appear in your shortcut browser.