Reference:https://blog.csdn.net/qq_37760750/article/details/77586744
##Download matlab2014A
#url:http://pan.baidu.com/s/1c19k7AC
#psw:mrvn
##Unzip .rar file
sudo apt-get install rar
sudo apt-get install unrar
sudo rar x MATHWORKS_R2014A.part1.rar
##Mount .iso file to /media
sudo mkdir /media/tmp_matlab
sudo mount -o loop MATHWORKS_R2014A.iso /media/tmp_matlab
##Install matlab
cd /media/tmp_matlab
sudo ./install
#选择不连网安装
#安装过程中使用序列号:12345-67890-12345-67890
#激活:选择Crack下的license_405329_R2014a.lic文件进行激活
#破解:由于/usr/local/MATLAB只有只读的权限, 所以先要将其权限修改为”可写”
sudo chmod -R a+w /usr/local/MATLAB
##Umount .iso file
sudo umount /media/tmp_matlab
##Setting environment variables
sudo gedit /etc/profile
#Adding:"PATH=$PATH:/usr/local/MATLAB/R2014a/bin"
#Save and close
source /etc/profile
##修改为直接在终端输入命令matlab启动matlab,而不用每次都输入sudo
sudo chown leegroup -R ~/.matlab #leegroup should be replaced with your computer's name.
#注:若是这样重新打开一个新的命令端后输入matlab还是无法打开的话,则将路径添加到~/.bashrc文件的最后一行,具体命令为:sudo gedit ~/.bashrc
PATH=$PATH:/usr/local/MATLAB/R2014a/bin
source ~/.bashr