Starting with R2014b, a normal MATLAB installation on Windows no longer registers .m files automatically. Choosing MATLAB from the Open With menu is not a good substitute: the file icon stays generic, and every double-click launches a separate MATLAB process.

The fix is to rebuild the association with a small script. For R2015a, it also requires three files to be copied into MATLAB's own private folder. Both versions start from the same archive: download the package, password 8dfg.

MATLAB R2015a

  1. Download and extract the archive.
  2. Copy the three files from its private folder into %MATLAB installation folder%\toolbox\matlab\winfun\private.
  3. Start MATLAB with administrator privileges. On Windows 7 or Windows 8, right-click the main MATLAB application and select Run as administrator.
  4. In MATLAB, open the extracted matlab_fileassociation.m and run it.
  5. The .m file association is rebuilt.

MATLAB R2014b

R2014b already includes the three files in its own private folder, so do not copy anything from the archive.

  1. Download and extract the archive.
  2. Start MATLAB with administrator privileges. On Windows 7 or Windows 8, right-click the main MATLAB application and select Run as administrator.
  3. In MATLAB, open the extracted matlab_fileassociation.m and run it.
  4. The .m file association is rebuilt.

After the script runs, .m files should be associated with MATLAB again rather than relying on Open With.