Desktop Tools and Development Environment |
Viewing and Making Changes to Directories
You can change the current directory, view its contents, add directories to the MATLAB search path, and change the way the Current Directory browser presents entries.
Changing the Current Working Directory and Viewing Its Contents
To change the current directory, use the current directory field. The Current Directory browser lists the files and directories in the current directory.
To view the contents of a subdirectory, double-click it, or select the subdirectory and press Enter or Return.
To move up one level in the directory structure, press the backspace (<-)key.
Function Alternative. Use dir
to view the contents of the current working directory or another specified directory.
Use what
with no arguments to display the MATLAB related files in the current working directory. Use which
to display the pathname for a specified function. Use exist
to see if a directory or file exists. Use fileattrib
to see or set file attributes, much like attrib
in DOS or chmod
in UNIX.
Changing the Display
Types of Files. To specify the types of files shown in the Current Directory browser, use the View menu. For example, you can show only M-files. If All Files is selected and you want to see specific file types, first clear the selection for All Files and then select the specific file types.
Columns. To show or hide columns, use preferences for the Current Directory browser. Select File -> Preferences -> Current Directory browser and select or clear the check boxes for Browser display options. For more information, see Browser Display Options.
You can sort the information shown in the Current Directory browser by column. Click the title of column on which you want to sort. The display is sorted, with the information in that column shown in ascending order, and an up arrow icon indicating the direction. Click a second time on the column title to sort the information in descending order.
In the Current Directory browser, select a file and then view information about the file in the Current Directory browser's lower pane. To view this, you must first select File -> Preferences -> Current Directory browser and under Browser display options, select the check box Show M, MDL and MAT file contents.
For an M-file, it shows the M-file help. For a Simulink model, it shows the complete description, allowing you to view information about a model without having to start Simulink. For a MAT-file, it displays the names of its variables along with their size, bytes, and class, allowing you to view the content of a MAT-file without loading it.
You can view more extensive help for the M-file selected in the Current Directory browser. From the context menu, select View Help. The reference page for that function appears in the Help browser.
Adding Directories to the MATLAB Search Path
From the Current Directory browser, you can add directories to the MATLAB search path. Right-click and from the context menu, select Add to Path. Then select one of the options:
Current Directory Browser | Creating, Renaming, Copying, and Removing Directories and Files |
© 1994-2005 The MathWorks, Inc.