在win7系统下,m文件等matlab可能会没成功实现关联,呢么如何实现关联呢?首先,以管理员身份运行matlab,新建m文件,拷贝下面代码,运行,一切搞定。
cwd=pwd;
cd([matlabroot '\toolbox\matlab\winfun\private']);
fileassoc('add', {'.m','.mat','.mdl','.fig','.p','.mlprj','.mexw32','.asv'})
cd(cwd);
disp('Changed Windows file associations. FIG, M, MAT, MDL, MEX, and P files are now associated with MATLAB.');
--------------------
解决了困扰已久的一个问题,留此备用