Installation guide

File Management Operations
Opening and Running Files
“Opening Files” on page 5-47
“Running M-Files” on page 5-49
Opening Files
Yo u can open a file from the Current D irectory browser and the file opens in
the tool associated with that file type.
To open a file, select one or m ore files and perform one of the following actions:
Press the Enter or Return key.
R ight-click and select Open from the context menu.
Double-click the file(s).
The file o pens in the appropriate tool, provided that the tool has been installed
on your system. For example, the Editor/Debugger opens for M-files, and
Simulink opens for model (
.mdl)files.
To open a file in the Editor/Debugge r, no matter what type it is, select Open
as Text from the context menu. One exception is P-files (
.p), w hich you
cannot open.
To open a file using an external application, select Open Outside M ATLAB
from the context menu. For ex ample, if you select
myfile.doc, Open
Outside MATLAB opens
myfile.doc in Microsoft Word, assuming you have
the
.doc file association c onfigured to start Word. This is also useful for file
types associated with MATLAB that are also associated with an external
applicat ion in Windows. For exam ple,
.mat is the exte nsion for MATLAB data
files as well as Microsoft Access files. When you double-click a
.mat file in the
Current Directory browser, it loads the MATLAB data file into the workspace.
If instead you want to open the
.mat file in A ccess, right-click it and select
Open Outside MATLAB. MATLAB opens the file using the applications
you associated with that file type in Windows. For more information, see
“Changing File Associations for MATLAB from Windows” on page 1-5.
5-47