重装系统后恢复matlab文件关联

时间:2022-10-11 20:50:55
重装系统后恢复matlab文件关联 2010-01-19 21:40

重装系统后,若没动MATLAB安装目标,则MATLAB不用重新安装。(同样的原因,可以移动MATLAB安装目标)

对MATLAB相关文件,建立重新关联就行了。

在MATLAB命令窗口执行如下命令,即可。


cwd=pwd;
cd([matlabroot '/toolbox/matlab/winfun/private']);
fileassoc('add',{'.m','.mat','.fig','.p','.mdl',['.' mexext]}); %重点
cd(cwd);
disp('Changed Windows file associations. FIG, M, MAT, MDL, MEX, andP files are now associated with MATLAB.')

或者

1.打开matlab,运行 help
2.在help窗口中搜索Utility to Change Windows File Associations
3.找到Utility to Change Windows File Associations的对应解释
4.最后就是直接点击所需的文件关联

 

from:http://www.eefocus.com/czzheng/blog/10-01/183657_c7e69.html


详细参考Matlab的帮助文档:

Starting the MATLAB Program on Windows Platforms ->

Associating Files with MATLAB on Windows Platforms

http://www.mathworks.es/help/techdoc/matlab_env/f8-8880.html#f8-28791