When you install MATLAB® on Windows® platforms, the installer sets up associations between certain file types and MathWorks® products. When you double-click a particular file type, identified by its file extension, Windows starts MATLAB and opens the file in the appropriate tool. The following table lists the file extensions associated with MathWorks products and the behavior that results from this association.
File Extension and Resulting Action
|.fig||Opens file in figure window|
|.m||Opens file in Editor|
|.mat||Opens Import Wizard to load the data into the MATLAB workspace.|
|.slx, .mdl||Opens file in a Simulink® model window|
|.mex[a]||Displays icon for MATLAB in Windows Explorer tool|
|.p||Displays icon for MATLAB in Windows Explorer tool|
File associations for the Windows Explorer tool do not affect what happens when you open one of these file types from within MATLAB. MATLAB acts on the file using the MATLAB tool associated with that file type.
For example, if your system associates .mat files with the Access™ application, when you open a MAT-file from within MATLAB, it opens the Import Wizard to load the data. To open a .mat file with the Access application, right-click myfile.mat, and from the context menu, select Open With, then the Access application.
To associate a different file type with MATLAB, use the Windows Default Programs control panel. On Windows 7 systems:
Click the Windows Start menu.
Select Control Panel.
Select Default Programs.
Select Associate a file type or protocol with a program.
In the Set Associations window, find the file extension in the displayed list and double-click it
To change the default association, click Change Program. This opens the Open with dialog box which lists other programs that might be recommended for this file extension. If it's a file extension associated with MATLAB, such as .mat, the list includes all the versions of MATLAB you have installed.
Click OK in the Open With dialog box.
Click Close to close the Set Associations window.
For more information about using the Default Programs control panel, see your Windows documentation.