注意最新版的matlab,用右击.m文件打开然后查找文件关联到meditor.exe,你是找不到matlab安装程序下的编辑器程序的,而只能找到matlab.exe之类的无效关联。所以不如索性用help里面自带的办法:
打开matlab,然后打开help窗口,然后打开help目录找到第一个条目Matlab-》User's Guide->Desktop Tools and Development Environment ->Start up and Shutdown->Starting and Quitting the MATLAB Program:然后查看右边窗口的内容部分,点击Starting the MATLAB Program on Windows Platforms链接,窗口跳到下面点击Associating Files with MATLAB on Windows Platforms链接,然后窗口往下拉找到如下内容:
==========================================================================
Utilities to Set Up File Associations on Windows Platforms. If you are viewing this topic in the MATLAB Help browser, you can run one of the utilities provided here to create associations in the Windows environment for common file types used by MATLAB. This requires you to have permission to write to the HKEY_CLASSES_ROOT registry key, which typically requires power user or administrator privileges.
*
Run utility to associate files with .fig extension with MATLAB
*
Run utility to associate files with .m extension with MATLAB
*
Run utility to associate files with .mat extension with MATLAB
*
Run utility to associate files with .mdl extension with MATLAB
*
Run utility to associate MATLAB with MEX-files
*
Run utility to associate MATLAB with P-files
*
Run utility to associate MATLAB with all of these file types: FIG, M, MAT, MDL, MEX, and P
The file type icon in the Windows Explorer tool might not reflect the change immediately.
=====================================================
直接点击上面这个链接 Run utility to associate files with .m extension with MATLAB就ok了。然后回到windows下随便找个.m文件直接双击,整个世界就亮了!