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
- Download and extract the archive.
- Copy the three files from its
privatefolder into%MATLAB installation folder%\toolbox\matlab\winfun\private. - Start MATLAB with administrator privileges. On Windows 7 or Windows 8, right-click the main MATLAB application and select Run as administrator.
- In MATLAB, open the extracted
matlab_fileassociation.mand run it. - The
.mfile association is rebuilt.
MATLAB R2014b
R2014b already includes the three files in its own private folder, so do not copy anything from the archive.
- Download and extract the archive.
- Start MATLAB with administrator privileges. On Windows 7 or Windows 8, right-click the main MATLAB application and select Run as administrator.
- In MATLAB, open the extracted
matlab_fileassociation.mand run it. - The
.mfile association is rebuilt.
After the script runs, .m files should be associated with MATLAB again rather than relying on Open With.