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?
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.
With Windows 10 it is currently (29.04.2020) not possible to set in system-control so:
If you have access to registry-editor
export key (backup):
open the export of "Computer\HKEY_CLASSES_ROOT.m" with your favorite text-editor and change ".m" to ".mat"
now double-click on the edited export of "Computer\HKEY_CLASSES_ROOT.m"
What a mess Microsoft, shame on you for that.