Associate Files with MATLAB on Windows Platforms

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. For information about MathWorks file extensions, see MathWorks File Extensions.

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 pane. On Windows 7 systems:

  1. Click the Windows Start menu.

  2. Select Control Panel and View by: Category.

  3. Select Programs.

  4. Select Default Programs.

  5. Select Associate a file type or protocol with a program.

  6. In the Set Associations window, find the file extension in the displayed list and either double-click it or click Change Program.

  7. The Open with dialog box opens, which lists other programs that might be recommended for this file extension. If it is a file extension associated with MATLAB, such as .mat, the list includes all the versions of MATLAB you have installed.

  8. Click OK in the Open With dialog box.

  9. To close the Set Associations window, click Close.

For more information about using the Default Programs control pane, see your Windows documentation.

Sometimes double-clicking a MATLAB file in Windows Explorer opens a new instance of MATLAB. To work around this issue, uninstall versions of MATLAB, release R2010a or earlier. Then reinstall MATLAB R2010b or later.

Alternatively, change the security setting on the matlabroot\toolbox\local\pathdef.m file to allow the Users group to write to the file. For more information, see

Was this topic helpful?