7

When MATLAB creates a binary file with extension .mat on my Windows 7 (64 bit) computer, Windows declares it in a directory as a "Microsoft Office Access Table Shortcut". Windows also does not provide the option to "Open With" any other program in the right-click menu. The file works properly if it is dragged and dropped into MATLAB. How can I change the file association to properly open the file with MATLAB?

Joel M.
  • 103

5 Answers5

7

Start->Default Programs->Associate a file type or protocol with a program.

Michael Lowman
  • 816
  • 4
  • 11
4

Right click an example file.

Choose 'Open With' on the menu then 'Choose Program'.

In the new window, choose MatLab & click the "Always use the selected program to open this kind of file" and click 'Open'.

The program should now be associated..

Pricey
  • 4,710
1

With Windows 10 it is currently (29.04.2020) not possible to set in system-control so:

If you have access to registry-editor

  1. export key:

    Computer\HKEY_CLASSES_ROOT.m

  2. export key (backup):

    Computer\HKEY_CLASSES_ROOT.mat

  3. delete key:

    Computer\HKEY_CLASSES_ROOT.mat

  4. open the export of "Computer\HKEY_CLASSES_ROOT.m" with your favorite text-editor and change ".m" to ".mat"

  5. now double-click on the edited export of "Computer\HKEY_CLASSES_ROOT.m"

==================================================

What a mess Microsoft, shame on you for that.

1

In Windows 7, go to control panel, Default Programs, Associate a file type with a specific program

This should give you a list of file extensions and their associated applications. Select the .mat extension, then click change program (button at upper right) and browse to select the 'matlab' executable.

Here's the MS ref

Lorenzo Von Matterhorn
  • 2,289
  • 1
  • 21
  • 20
NeilC
  • 11
0

There's an official utility function from MathWorks that is included in MATLAB itself that will fix this issue. See this MathWorks technical support solution for details.

Sam Roberts
  • 115
  • 4