MATLAB For Dummies
Book image
Explore Book Buy On Amazon

The GUI method of working with folders in MATLAB requires the Current Folder window. (To display this window, choose Layout→Current Folder in the Environment group of the Toolstrip’s Home tab.) In this case, the Current Folder toolbar appears at the top of the Current Folder window. You can place it below the Toolstrip by choosing Layout→Current Folder Toolbar→Below Toolstrip in the Environment group of the Home tab.


The Current Folder toolbar shows the current folder that the Current Folder window displays. To change locations, simply type the new location in the field provided. You can also select a location by clicking the right-pointing arrow next to each level.

The arrow changes to a down-pointing arrow with a list of destinations below it. Clicking the magnifying glass icon in the field turns it into a Search field where you can choose the kind of file you want to find.


The Current Folder toolbar also includes four buttons. Each of these buttons helps you move to another location on the hard drive as follows:

  • Back: Moves the location back one position in the history list. The history list is a list that is maintained by MATLAB that tracks the locations you’ve visited.

  • Forward: Moves the location forward one position in the history list.

  • Up One Level: Moves the location up to the parent folder.

  • Browse for Folder: Displays a Select New Folder dialog box that you can then use to find another location on the hard drive. After you find the folder, highlight its entry and click Select Folder to select it.


The Current Folder window provides access to all the folders that you’ve set up for organizational purposes.

Note that not all the entries on the context menu have to do with exploring folders or managing them from a file structure perspective. The following list focuses on those commands that do help you manage the file structure.

  • Open: Opens the folder so that it becomes the current folder in the Current Folder toolbar.

  • Show in Explorer (Windows only): Opens a copy of Windows Explorer so that you can interact with the folder using this Windows tool.

  • Create Zip File: Creates a new .zip file that contains the compressed content of the folder. This feature makes sending the folder to someone else easier.

  • Rename: Changes the name of the folder.

  • Delete: Removes the folder and its content from the hard drive. Depending on how you have your system configured, this option could permanently destroy any data found in the folder, so use it with care.

  • New Folder: Creates a new child folder within the selected folder.

  • New File: Creates a new file within the folder. You can choose from these types of files:

    • Script

    • Function

    • Example

    • Class

    • Zip File

  • Compare Against: Matches the content of the selected folder against another folder and tells you about the differences.

  • Cut: Marks the folder for removal from the hard drive and places a copy on the Clipboard. The folder is removed from its current location when you paste the copy in its new location.

  • Copy: Places a copy of the folder and its content on the Clipboard so that you can paste copies of it in other locations.

  • Paste: Places a copy of a folder and its content as found on the Clipboard in the location you indicate.

  • Refresh: Verifies that the presentation of folders and files in the Current Folder window matches the actual content on the hard drive. Another application may have made modifications to the hard drive content, and with this command you can synchronize MATLAB with the physical device.

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 produced 114 books and more than 600 articles on topics ranging from functional programming techniques to working with Amazon Web Services (AWS). Luca Massaron, a Google Developer Expert (GDE),??interprets big data and transforms it into smart data through simple and effective data mining and machine learning techniques.

This article can be found in the category: