Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

Viewing Files and Folders

Viewing the Contents of a Folder in the Current Folder Browser

The Current Folder browser displays the contents of the current folder.

Double-clicking a subfolder displays the folder contents, and makes that folder become the MATLAB current folder.

View the contents of subfolders by clicking the + (expand) button. MATLAB might not be able to run files in the subfolders. See Making Files and Folders Accessible to MATLAB.

Viewing Hidden Files and Folders

The operating system, by default, hides certain files and folders. The Current Folder browser can display hidden files and folders. How to instruct the Current Folder browser to display hidden files depends on the operating system.

On Microsoft Windows platforms, the Current Folder browser follows the Windows preference for showing hidden files. To set or change the Windows preference:

  1. Open Windows Explorer.

  2. Select Tools > Folder Options.

  3. Click the View tab.

  4. Under Advanced settings, select Show hidden files and folders.

On other platforms, specify the behavior using Current Folder preferences:

  1. Select File > Preferences > Current Folder.

  2. Specify the setting for Hidden files.

Refreshing the View

When files and folders change outside of MATLAB, the Current Folder browser automatically reflects the changes. When you access files on a network, frequent refreshing of the Current Folder browser can slow performance in MATLAB. Try improving the performance by changing how frequently refreshing occurs using the Current Folder Refresh preference:

  1. Select File > Preferences > Current Folder.

    By default, the Auto-refresh view from file system option is on, with an update time of 3 seconds. Every 3 seconds, the Current Folder browser checks for and reflects changes made from programs and tools other than MATLAB.

  2. Try to alleviate slowness by either:

    • Increasing the Number of seconds between auto-refresh.

    • Clearing the Auto-refresh view from file system check box to turn off the feature.

  3. Click OK.

To refresh the view at any time:

  1. Right-click in the list area of the Current Folder browser.

  2. Select Refresh from the context menu.

Viewing the Contents of a Folder Using Functions

Use the dir or ls functions.

Viewing Details About Files and Folders In the Current Folder Browser

In the Current Folder browser, details about files and folders are in columns, beneath file and folder names, and in the Details panel.

Customizing the Column View

To specify the columns that the Current Folder browser displays (size, date modified, type, and description):

  1. Select View > Show.

  2. Select the columns to show. Clear the columns to hide.

To show fewer columns:

To modify the columns:

Viewing Descriptions

Show or hide descriptions in the Current Folder browser by selecting View > ShowDescription.

Descriptions appear in gray text beneath the name of the file or folder. The Current Folder browser shows descriptions only for files and folders that are relevant to products from The MathWorks. How the Current Folder browser gets the description depends on the type of item:

To provide descriptions for your own files and folders, see Providing Your Own Help and Demos.

Using the Details Panel

View more information about files and folders that are relevant to MathWorks products by selecting the file or folder. Information appears in the Details panel.

To customize the Details panel:

Image of the Details panel in the Current Folder browser.

Viewing and Going To Elements within an M-File.   The Details panel lists these elements in the selected M-file:

To open the M-file in the Editor, scrolled to the start of the element, double-click the element in the Details panel.

Viewing and Loading MAT-File Variables.   Use the Details panel to view the name, class, and value of all variables in the selected MAT-file. To load a variable into the workspace, select it in the Details panel and drag it to the Workspace browser.

Viewing Help for an M-File

From the current folder browser, you can view help for an M-file that is in the current folder or in a folder on the search path:

  1. Right-click the M-file.

  2. Select View Help from the context menu.

    The reference page, if it exists, opens in the Help browser. Otherwise M-file help, if it exists, displays in the Help browser.

Getting Details About Files and Folders Using Functions

To...Use This Function
Get the name, date, and size for a file or folderdir
Get and set the read-write status and other attributes for a file or folderfileattrib
Separate a path name into folder and file namefileparts
Build a file or folder name from partsfullfile
Determine if a string corresponds to a folderisdir

Sorting and Grouping Files and Folders in the Current Folder Browser

Organize, find, and manage the files and folders you use with MATLAB by sorting and grouping items.

By default, sorting is by Name and grouping is off.

Regardless of the sorting and grouping options selected, the Current Folder browser lists folders and files separately.

Sorting Items

To change the order of items listed, sort by column:

  1. Select View > Sort By.

  2. Select the name of the column to sort by.

Grouping Items

To see related items listed together, group them:

  1. Select View > Group By.

  2. Select Type, Size, or Date Modified.

Each group has a label. To hide the items in a group, click the collapse button (–) next to the label.

To turn off grouping, select View > Group By > Stop Grouping.

Using Sorting and Grouping Together

You can sort and then group, or group and then sort.

After grouping items, sort using different criteria. The sort applies to the groups and to items within each group.

Example of Sorting and Grouping

The following figure illustrates grouping by type, with some groups collapsed. The sort order is descending by date

Viewing Only One Type of File

To view only files of a certain type, for example, only M-files, use a simple search. See Simple Search for File and Folder Names in the Current Folder Browser.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS