The startup folder is the current folder in the MATLAB® application when it starts. The method you use to start MATLAB determines the startup folder value. (To locate the startup folder, type pwd after starting MATLAB.) For convenience, make the startup folder a folder that you frequently use.
On Windows® and Apple Macintosh platforms, the default startup folder is a folder called userpath, which is added automatically to the search path at startup. On Windows platforms, this folder is Documents/MATLAB.
On Linux® platforms, you can set the userpath as the startup folder.
Use the userpath function to:
View the userpath value.
Specify a different default value for userpath, if you start MATLAB by double-clicking the MATLAB shortcut/icon.
Using userpath as the startup folder offers these benefits:
You can store the MATLAB files you work with in one, appropriately named location, such as Documents/MATLAB.
Your MATLAB files are readily available upon startup, because the current folder is always the same.
You can always run your files because MATLAB automatically adds the userpath folder to the top of the search path.
The first time you run a new version of MATLAB, MATLAB automatically creates the userpath folder if it does not exist.
When you upgrade to a newer version of MATLAB, MATLAB automatically continues to use the same startup folder and your existing files.
The default userpath utilizes the benefits provided by the standard location in the Windows and Macintosh environments for storing personal files. Files in the Documents/MATLAB folder are available to you when you use other machines. Because each user has their own Documents/MATLAB folder, other users, even those using your machine, cannot access files in your Documents/MATLAB folder.