MATLAB For Dummies
Book image
Explore Book Buy On Amazon

When you first start MATLAB, the current folder always defaults to the MATLAB folder found in your user folder for the platform of your choice. For Windows users, that means the C:Users<User Name>DocumentsMATLAB folder. Burying your data way down deep in the operating system may seem like a good idea to the operating system vendor, but you can change the current folder location to something more convenient when desired.

Perhaps your data is actually stored on a network drive, you want to use a shared location so that others can see your data, or you simply want to use a more convenient location on your local drive. The following steps help you change the current folder:

Click Set Path in the Environment group on the Toolstrip’s Home tab.

Click Set Path in the Environment group on the Toolstrip’s Home tab.

You see the Set Path dialog box.

This dialog box lists all the places the MATLAB searches for data, with the default location listed first. You can use these techniques to work with existing folders (go to Step 3 when you’re finished):

To set an existing folder as the default folder, highlight the folder in the list and click Move to Top.

To stop using an existing folder, highlight the folder in the list and click Remove.

Click Add Folder.

Click Add Folder.

You see the Add Folder to Path dialog box.

This dialog box lets you choose an existing folder that doesn’t appear in the current list or add a new folder to use:

To use a folder that exists on your hard drive, use the dialog box’s tree structure to navigate to the folder, highlight its entry, and then click Select Folder.

To create a new folder, highlight the parent folder in the dialog box’s tree structure, click New Folder, type the name of the folder, press Enter, and then click Select Folder.

Click Save.

MATLAB makes the folder you select the new default folder. (You may see a User Account Control dialog box when working with Windows; click Yes to allow Windows to perform the task.)

Click Close.

The Set Path dialog box closes.

Type the new location in the Address field.

The Current Folder display changes to show the new location.

About This Article

This article is from the book:

About the book authors:

John Paul Mueller is an author and technical editor with experience in application development, database management, machine learning, and deep learning. He has written hundreds of books and articles helping everyday people learn everything from networking to database management.

John Mueller has published more than 100 books on technology, data, and programming. John has a website and blog where he writes articles on technology and offers assistance alongside his published books.

Luca Massaron is a data scientist specializing in insurance and finance. A Google Developer Expert in machine learning, he has been involved in quantitative analysis and algorithms since 2000.

This article can be found in the category: