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?


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


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..

  • 1
    For this particular problem, windows does not provide the "Open With" option. I don't know if that's because it thinks that the .mat file is a shortcut or what, but it doesn't provide that option. – Joel M. Sep 20 '17 at 20:29

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


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.

  • That's no utility function, it's a checklist for using Windows Explorer to change the file association. – Ben Voigt Aug 8 '14 at 21:29
  • @BenVoigt Looks like they've changed the content of that page since I linked to it. The utility function always used to just do basically the same things that other answers have suggested, in any case. – Sam Roberts Aug 11 '14 at 9:42

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:


  2. export key (backup):


  3. delete key:


  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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy