How to install MATALB 2017a on Windows 10

I choose the latest version of MATLAB (i.e. MATLAB 2017a) to install.

Install MATLAB

MATLAB 2017a installation packages are given on my Baidu NetDisk
Pass: t7ke

On windows 10, just right click the dvd1 iso file and chose load. Find ‘setup.exe’ to start installation. As we want to crack it later, we choose offline activation and input the serial number: 09806-07443-53955-64350-21751-41297

After some time the program will elude you to insert dvd2. Then you can just quit dvd1 and then load dvd2 and continue installation.

Crack

After the installation process has finished, enter the installation path of MATLAB. Mine is D:\Program Files\MATLAB\R2017a, for example. Unzip our crack zip file and paste .lic file into dir ‘licences’. Then we double click MATLAB 2017a and open it. It doesn’t matter if we met a error message box, just close it. Then paste our .dll file into relevant directory. Done!

success

MATLAB2017a 与 VS2017 mex交叉编译

环境搭建

mex交叉编译需要安装外接的编译器来进行,但是MATLAB对于第三方的编译器版本有限制,各个版本可支持的第三方编译器可参看网址:https://www.mathworks.com/support/sysreq/previous_releases.html
建议先安装C/C++的编译环境,这样在安装MATLAB的时候就能可能自动检测出所需要的编译环境,但也可能会失败。比如,我在MATLAB命令行中输入mex -setup,提示没有找到编译器,说明出现问题了。

出现问题就需要解决,我的环境配置:

  • Windows 10
  • MATLAB 2017a
  • Visual Studio 2017

对于MATLAB 2017b,已经修复了无法与VS2017交叉编译的问题。而对于2017a,需要前往论坛下载补丁,也可以从我的网盘链接中下载。然后按照下面的步骤执行:

  1. 在MATLAB命令行中输入matlabroot,显示MATLAB软件根目录,然后让MATLAB当前工作空间回到根目录,然后退出软件。
  2. 补丁下载成功后,解压并将bin文件夹中内容复制粘贴到MATLAB相应目录下。
  3. 重新打开MATLAB 2017a,输入mex -setup测试。

success

Done !

mex交叉编译

设定为C++编译器编译:mex -setup C++

编译文件:mex 文件名

编译成功后,会产生.mexw64后缀文件。

写在后面的话

在涉足交叉编译之前,我并不知道MATLAB和C/C++编译器的版本号需要匹配,一开始安装了MATLAB 2014a和Visual Studio 2017,发现并不能兼容,同时也觉得MATLAB 2014a的版本号太老了,于是去下载安装了MATLAB 2017a(Crack Link),然后查找了论坛网站,找到了这个解决办法。

参考文章:

【1】论坛——MATLAB 2017能不能配合Visual Studio 2017使用:https://www.mathworks.com/matlabcentral/answers/335092-can-i-use-microsoft-visual-studio-2017-with-matlab

【2】补丁报告——MATLAB 2017a与Visual Studio 2017交叉编译:https://www.mathworks.com/support/bugreports/1487958?s_tid=mwa_osa_a

【3】 https://blog.csdn.net/gisboygogogo/article/details/76793803

Linux command of the day

Comments

You forgot to set the shortname for Disqus. Please set it in _config.yml.
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×