安装MATLAB2016a的完整步骤

来源:互联网 发布:flashfxp for mac 编辑:程序博客网 时间:2024/05/20 09:07

电脑换了一个系统,因为win10的总是让我的MATLAB闪退,好不容易憋出点代码,闪退之后 还没保存,觉得很蓝瘦香菇。。

于是转个win7的系统,还是这个用的比较习惯,这里多谢谢青云兄。废话不多说,还是说正题:(相关材料的下载,我放在了博文的最后面)

1、下载2016a的镜像文件(就是MATLAB安装包,但是下载的时候,人家这么称呼它而已),以及破解文件,crack。(这里不知道咋上传内容啊,这里只是一个镜像和破解文件,以及最后有一个2016a的破解bug,需要一个关联函数 ,调用一下,之后m文件就会显示为带有MATLAB log的文件标识,也是后来才发现的,百度了好久,完成这项工作,用了一天。。。。博主比较笨。。。。)

2、安装过程按照这个链接下的文字进行:步骤很详细,只要你细心基本不会出现错误

http://jingyan.baidu.com/article/870c6fc300c2fab03ee4be70.html点击打开链接

这里有相应的是我的破解文件夹所在位置,这里有个readme.txt文件,有相应的安装序列号,以下是我的文件位置:

D:\Soft\MATLAB2016a_orig\Matlab 2016a Win64 Crack

3、祝大家能够顺利完成2016a的安装!

一、MATLAB2016a下载网址:http://bt.neu6.edu.cn/thread-1530863-1-1.html。。。(不知道咋上传,很遗憾,不能直接给大家软件安装包)

二、CRACK is here: uan
link
:http://pan.baidu.com/s/1skLPFkx 密码:jfl6

得到的是这样的压缩文件:Matlab 2016a Win64 Crack。rar             你需要自行解压,按照上面的安装步骤进行

三、关联文件 associatefile.m(建议你们粘贴到你自己的m文件下面,这样便于MATLAB运行这个函数)

将associateFiles.m添加到当前工作路径
命令行中输入associateFiles
回车,生成MatlabFileAssocFix.reg文件
运行这个reg文件(在文件夹下面双击这个reg文件,就是运行。。。)
重启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 inputif (nargin < 1 || isempty(action))  action      = 'add';endif (nargin < 2)  userExtList = {};endif (nargin < 3)  fileStr = '';endif (~iscell(userExtList))  if (isempty(userExtList))    userExtList = {};  else    userExtList = {userExtList};  endend% Sanity checkif (~ischar(action) || (~strcmpi(action, 'add') && ...    ~strcmpi(action, 'delete') && ~strcmpi(action, 'deleteadd')))  error('The action to perform must be ''add'', ''delete'' or ''deleteadd''!')endif (~isempty(userExtList) && ~min(cellfun(@ischar, userExtList)))  error('The file extension list must be a string or a cell array of strings!')endif (~ischar(fileStr))  error('The file to write to must be a string!')end% Get the currently running MATLAB versionverStr = regexp(version, '(\d*?\.\d*?\.\d*?)\.', 'tokens');verStr = verStr{1}{1};verNum = str2double(regexprep(verStr, '(\d*?\.\d*)[\x0000-\xffff]*', '$1'));verHex = sprintf('%04x', str2double(regexprep(verStr, ...  '(\d*?)\.[\x0000-\xffff]*', '$1')), str2double(regexprep(verStr, ...  '\d*?\.(\d*?)\.[\x0000-\xffff]*', '$1')));% Get 32/64-bitarch = computer;switch arch  case 'PCWIN'    binFolder = 'win32';  case 'PCWIN64'    binFolder = 'win64';endbinPath = fullfile(matlabroot, 'bin', binFolder);% Known MATLAB files with possible DDE actionsfileExtCell = {...  'fig' ,   'MATLAB Figure'              , '-62'                       , ...  {'Open', 'uiopen(''%1'',1)'}           , []                          ; ...  'm'     , 'MATLAB Code'                , '-58'                       , ...  {'Open', 'uiopen(''%1'',1)'}           , {'Run', 'run(''%1'')'}      ; ...  'mat'   , 'MATLAB Data'                , '-59'                       , ...  {'Load', 'load(''%1'')'    }           , {'Open', 'uiimport(''%1'')'}; ...  'mdl'   , 'Simulink Model'             , '-61'                       , ...  {'Load', 'uiopen(''%1'',1)'}           , []                          ; ...  'mdlp'  , 'Simulink Protected Model'   , '-72'                       , ...  []                                     , []                          ; ...  'mexw32', 'MATLAB MEX'                 , '-63'                       , ...  []                                     , []                          ; ...  'mexw64', 'MATLAB MEX'                 , '-63'                       , ...  []                                     , []                          ; ...  'mn'    , 'MuPAD Notebook'             , '-66'                       , ...  {'Open', 'mupad(''%1'')'}              , []                          ; ...  'mu'    , 'MuPAD Code'                 , '-67'                       , ...  {'Open', 'uiopen(''%1'',1)'}           , []                          ; ...  'muphlp', 'MuPAD Help'                 , '-68'                       , ...  {'Open', 'doc(symengine, ''%1'')'}     , []                          ; ...  'p'     , 'MATLAB P-code'              , '-60'                       , ...  []                                     , []                          ; ...  'slx'   , 'Simulink Model (SLX format)', '-73'                       , ...  {'Open', 'uiopen(''%1'',1)'}           , []                          ; ...  'ssc'   , 'Simscape Model'             , '-65'                       , ...  {'Open', 'uiopen(''%1'',1)'}           , []                          ; ...  'xvc'   , 'MuPAD Graphics'             , '-69'                       , ...  {'Open', 'mupad(''%1'')'}              , []                          ; ...  'xvz'   , 'MuPAD Graphics'             , '-70'                       , ...  {'Open', 'mupad(''%1'')'}              , []                          ; ...  'mlapp'       , 'MATLAB Application'              , [] , [], []      ; ...   'mltbx'       , 'MATLAB Toolbox'                  , [] , [], []      ; ...   'mldatx'      , 'Simulink Scenario'               , [] , [], []      ; ...    'req'         , 'Simulink Requirements Link'      , [] , [], []      ; ...   'sldd'        , 'Simulink Dictionary'             , [] , [], []      ; ...   'slddc'       , 'Simulink Dictionary'             , [] , [], []      ; ...        'mlappinstall', 'MATLAB Application'              , [] , [], []      ; ...    'mlpkginstall', 'MATLAB Support Package'          , [] , [], []      ; ...   'slxp'        , 'Simulink Protected Model Package', [] , [], []      ; ...   'sltx'        , 'Simulink Template'               , [] , [], []      ; ...   'mlprj'       , 'MATLAB Project'                  , [] , [], []};% Possibly trim listif (~isempty(userExtList))  fileExtCell = fileExtCell(ismember(fileExtCell(:, 1), ...    regexprep(userExtList, '\.', '')), :);end% Make registry fileif (~isempty(fileStr))  % Possibly add file extension  [~, ~, tmp] = fileparts(fileStr);  if (isempty(tmp))    fileStr = [fileStr, '.reg'];  end  fid = fopen(fileStr, 'w');else  fid = fopen('MatlabFileAssocFix.reg', 'w');endif (fid == -1)  error('Failed to create registry file')end% Write intial linesfprintf(fid, '%s\r\n\r\n', 'Windows Registry Editor Version 5.00');fprintf(fid, '%s\r\n\r\n', ';FIXES MATLAB FILE ASSOCIATIONS');% REMOVE OLD KEYSexplorerKey = ['HKEY_CURRENT_USER\Software\Microsoft\Windows\', ...  'CurrentVersion\Explorer\FileExts'];% Iterate over file extensionsfor fileExtNo = 1 : size(fileExtCell, 1)  rmKeys  = {};  fileExt = fileExtCell{fileExtNo, 1};    % File extension keys  [status, result] = dos(['reg query HKEY_CLASSES_ROOT /f .', fileExt, ...    ' /k /e']);  if (~status)    keys = regexp(result, '(HKEY_CLASSES_ROOT[\x0000-\xffff]*?)\n', 'tokens');    rmKeys = [rmKeys, keys{:}];  end    % Old style keys without version numbers  if (~strcmpi(fileExt, 'mexw64'))    % Uses single DDE key for mex files    if (strcmpi(fileExt, 'mexw32'))      fileExtTmp = 'mex';    else      fileExtTmp = fileExt;    end    [status, result] = dos(['reg query HKEY_CLASSES_ROOT /f ', ...      fileExtTmp, 'file /k /e']);    if (~status)      keys = regexp(result, '(HKEY_CLASSES_ROOT[\x0000-\xffff]*?)\n', ...        'tokens');      rmKeys = [rmKeys, keys{:}];    end  end    % New style keys with version number  if (strcmpi(action, 'add'))    % Only remove keys related to this version    [status, result] = dos(['reg query HKEY_CLASSES_ROOT /f MATLAB.', ...      fileExt, '.', verStr ' /k']);  else    % Remove keys related to ALL version    [status, result] = dos(['reg query HKEY_CLASSES_ROOT /f MATLAB.', ...      fileExt, '. /k']);  end  if (~status)    keys = regexp(result, '(HKEY_CLASSES_ROOT[\x0000-\xffff]*?)\n', 'tokens');    rmKeys = [rmKeys, keys{:}];  end    % Explorer keys  [status, result] = dos(['reg query ', explorerKey, ' /f .', fileExt, ...    ' /k /e']);  if (~status)    keys = regexp(result, '(HKEY_CURRENT_USER[\x0000-\xffff]*?)\n', 'tokens');    rmKeys = [rmKeys, keys{:}];  end    % Write to file  if (~isempty(rmKeys))    fprintf(fid, '%s\r\n\r\n', [';REMOVES ', upper(fileExt), ...      ' FILE ASSOCIATIONS']);    for keyNo = 1 : length(rmKeys)      key = rmKeys{keyNo};      fprintf(fid, '%s\r\n\r\n', ['[-', key, ']']);    end  endend% ADD KEYSif (~strcmpi(action, 'delete'))  % Get text Persistent Handler  [status, result] = dos(...    'reg query HKEY_CLASSES_ROOT\.txt\PersistentHandler /ve');  if (~status)    PersistentHandler = regexp(result, '\{[\x0000-\xffff]*?\}', 'match');    PersistentHandler = PersistentHandler{1};  else    PersistentHandler = '';  end  % DDE call  ddeCall = 'ShellVerbs.Matlab';  if (verNum > 8)    % Changed from R2013a    ddeCall = [ddeCall, '.', verStr];  end  % Default icon  defIcon = 'm';  if (~exist(fullfile(binPath, 'm.ico'), 'file'))    defIcon = '';  end  % Path to MATLAB binary directory with \\  binPathStr = regexprep(binPath, '\\', '\\\\');    % Write Shell Open key  key = ['[HKEY_CLASSES_ROOT\Applications\MATLAB.exe\shell\open', ...    '\command]%r', '@="\"', binPathStr, '\\MATLAB.exe\" \"%1\""%r%r'];  fprintf(fid, '%s\r\n\r\n', ';ADD SHELL OPEN');  lines = regexp(key, '([\x0000-\xffff]*?)%r', 'tokens');  for lineNo = 1 : length(lines)    fprintf(fid, '%s\r\n', lines{lineNo}{1});  end    % Iterate over file types  for fileExtNo = 1 : size(fileExtCell, 1)    fileExt = fileExtCell{fileExtNo, 1};        % File extension keys    key  = ['[HKEY_CLASSES_ROOT\.', fileExt, ']%r@="MATLAB.', fileExt, '.', ...      verStr, '"%r'];    if (strcmpi(fileExt, 'm') && ~isempty(PersistentHandler))      % Add some values      key = [key, '"Content Type"="text/plain"%r', ...        '"PerceivedType"="Text"%r'];    end    key = [key, '%r'];    key = [key, '[HKEY_CLASSES_ROOT\.', fileExt, ...      '\OpenWithProgids]%r"MATLAB.', fileExt, '.', verStr, '"=""%r%r'];    if (strcmpi(fileExt, 'm') && ~isempty(PersistentHandler))      key = [key, '[HKEY_CLASSES_ROOT\.', fileExt, ...        '\PersistentHandler]%r@="', PersistentHandler, '"%r%r'];    end    key  = [key, '[HKEY_CLASSES_ROOT\.', fileExt, ...      '\Versions\MATLAB.', fileExt, '.' verStr, ']%r"FileVersionMS"=dword:', ...      verHex, '%r"FileVersionLS"=dword:00000000%r%r'];        % DDE keys    ddeData = fileExtCell(ismember(fileExtCell(:, 1), fileExt), :);    key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...      ']%r@="', ddeData{2}, '"%r'];    if (~isempty(ddeData{3}))      key = [key, '"FriendlyTypeName"="@', binPathStr, '\\matlab.exe', ...        ',', ddeData{3}, '"%r'];    end    key = [key, '%r'];    % Icon    icon = fileExt;    if (~exist(fullfile(binPath, [icon, '.ico']), 'file'))      icon = defIcon;    end    if (~isempty(icon))      key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...        '\DefaultIcon]%r@="', binPathStr, '\\', icon, '.ico,0"%r%r'];    end    % Shell actions    for shellActionNo = 4:5      ddePar = ddeData{shellActionNo};      if (~isempty(ddePar))        key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...          '\Shell\', ddePar{1}, ']%r@="', ddePar{1}, '"%r%r'];        key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...          '\Shell\', ddePar{1}, '\command]%r@="\"', binPathStr, ...          '\\matlab.exe\""%r%r'];        key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...          '\Shell\', ddePar{1}, '\ddeexec]%r@="', ddePar{2}, '"%r%r'];        key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...          '\Shell\', ddePar{1},'\ddeexec\application]%r@="', ...          ddeCall, '"%r%r'];        key = [key, '[HKEY_CLASSES_ROOT\MATLAB.', fileExt, '.' verStr, ...          '\Shell\', ddePar{1},'\ddeexec\topic]%r@="system"%r%r'];      end    end        % Explorer keys    key = [key, '[', explorerKey, '\.', fileExt, '\OpenWithProgids]%r'];    if (strcmpi(fileExt, 'm'))      key = [key, '"m_auto_file"=hex(0):%r'];    end    key = [key, '"MATLAB.', fileExt, '.',  verStr, '"=hex(0):%r%r'];    if (~isempty(ddeData{4}))      % Add key      key = [key, '[', explorerKey, '\.', fileExt, ...        '\OpenWithList]%r"a"="MATLAB.exe"%r"MRUList"="a"%r%r'];    else      key = [key, '[', explorerKey, '\.', fileExt, '\OpenWithList]%r%r'];    end    % Write to file    fprintf(fid, '%s\r\n\r\n', [';ADD ', upper(fileExt), ...      ' FILE ASSOCIATIONS']);    lines = regexp(key, '([\x0000-\xffff]*?)%r', 'tokens');    for lineNo = 1 : length(lines)      fprintf(fid, '%s\r\n', lines{lineNo}{1});    end  end  end% Cloese filefclose(fid);


1 0
原创粉丝点击