资源简介
解决现在MATLAB文件与软件无法关联的问题,可以实现MATLAB软件相关文件的关联。

代码片段和文件信息
function associateFiles(action userExtList fileStr)
% associateFiles(action extList fileStr)
%
% Makes a registry files that can be used to set correct file associantions on
% a windows platform. The following MATLAB file extensions are supported:
% .m .mat .fig .mexw32 .mexw64 .p .mdl .mdlp .slx .mldatx .req
% .sldd .slddc .slxp .sltx .mn .mu .muphlp .xvc .xvz .ssc .mlapp
% .mlappinstall .mltbx .mlpkginstall .mlprj
%
% INPUT:
% action - optional string.
% * ‘add‘ (default) adds/rewrites the MATLAB file association registry
% keys for this version.
% * ‘delete‘ deletes the MATLAB file association registry entries for
% ALL versions of MATLAB (including “old style“ ones)
% * ‘deleteadd‘ is the same as ‘delete‘ followed by ‘add‘
% extList - optional string or cell array of strings containing the file
% extensions that should be associated with this version. Default is
% all MATLAB file extension (see above).
% fileStr - optional string with the name of the registry file to be written
% (possibly including path). Default is the file
% ‘MatlabFileAssocFix.reg‘ in the current directory.
%
% USAGE:
% 1) Run with desired options (see above). A registry file should have been
% created.
% 2) Exit all running instances of MATLAB.
% 3) Make a backup copy of the windows registry if you need to restore the
% changes see https://support.microsoft.com/en-us/kb/322756
% 4) Double click on the created file (possibly need to enter a password) and
% confirm.
% 5) Restart Windows (or explorer.exe).
% 6) The MATLAB files should now be associated with the MATLAB version that the
% registry file was created in and e.g. m-files should be opened in an
% already running instance of MATLAB.
%
% EXAMPLES:
% * associateFiles(‘deleteadd‘) - Makes a registry files that deletes all
% previous MATLAB file association registry keys and write new ones that
% associates all MATLAB files with the MATLAB version that the registry file
% was created in.
% * associateFiles(‘‘ {‘.m‘ ‘.mat‘ ‘.fig‘} ‘myFile‘) - Makes a registry file
% “myFile.reg“ that associates m- mat- and fig-files with the MATLAB version
% that the registry file was created in.
%
% VERSION 1.0
% Defualt input
if (nargin < 1 || isempty(action))
action = ‘add‘;
end
if (nargin < 2)
userExtList = {};
end
if (nargin < 3)
fileStr = ‘‘;
end
if (~iscell(userExtList))
if (isempty(userExtList))
userExtList = {};
else
userExtList = {userExtList};
end
end
% Sanity check
if (~ischar(action) || (~strcmpi(action ‘add‘) && ...
~strcmpi(action ‘delete‘) && ~strcmpi(action ‘deleteadd‘)))
error(‘The action to perform must be ‘‘add‘‘ ‘‘delete‘‘ or ‘‘deleteadd‘‘!‘)
end
if (~isempty(userExtList) && ~min(cellfun(@ischar userExtList)))
error(‘The file extension list mu
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 14222 2015-06-11 15:57 matlab文件关联方法\associateFiles\associateFiles.m
文件 1524 2015-06-11 15:57 matlab文件关联方法\associateFiles\license.txt
文件 30700 2018-05-07 19:18 matlab文件关联方法\associateFiles\MatlabFileAssocFix.reg
文件 139 2016-04-04 10:34 matlab文件关联方法\associateFiles\readme.txt
目录 0 2018-05-07 19:20 matlab文件关联方法\associateFiles
目录 0 2018-05-07 19:20 matlab文件关联方法
----------- --------- ---------- ----- ----
46585 6
相关资源
- 串行级联cpm系统MATLAB仿真
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
评论
共有 条评论