Prerequisites
- Administrative access
- unrar CLI utility tool
unrar can be installed with the command
Ubuntu
sudo apt install unrar
Fedora
sudo dnf install unrar
Extracting the Package
At first we need to extract the contents of the downloaded MATLAB 2018a rar file, it can be done with the command
unrar x <filename>.rar
In the extracting process it might ask for a password, the password should be provided by mathworks.
After the extraction process there sould be 2 iso files in the extracted folder, we need to mount this iso files to combine them into 1 installer file, but at first we need need create the mount points
Creating The Mounting points
To mount the iso files, the mounting point directories should be created first. We will make total 3 directories at /media/
- dvd1 directory to mount the dvd1.iso file
- dvd2 directory to mount the dvd2.iso file
- installer directory to combine all the components of dvd1 & dvd2 directory
The following commands should be used to create the directories
sudo mkdir -p /media/mathworks/dvd1
sudo mkdir -p /media/mathworks/dvd2
sudo mkdir -p /media/mathworks/installer
Mounting The ISO Files to Mounting points
sudo mount -t iso9660 -o loop <path to dvd1>/dvd1.iso /media/mathworks/dvd1
sudo mount -t iso9660 -o loop <path to dvd1>/dvd2.iso /media/mathworks/dvd2
Creating The installer
sudo cp -r /media/mathworks/dvd1/* /media/mathworks/installer/
sudo cp -r /media/mathworks/dvd2/* /media/mathworks/installer/
Run The Installer
sudo sh /media/mathworks/installer/install
The installer will run, it will ask for installation location, which modules you wish to install. In the middle of the installation it will ask for a product key or online license. I have a Product Key option should be selected and the product key is stored in the readme.txt
file
Post Installation Operations
-
Copy the
license_standalone.lic
to the license directory at the installation directorysudo cp /path/to/license_standalone.lic /path/to/installation/directory/licenses/
-
Similarly the
libmwgrimpl.so
file should be replaced by the provided libmwgrimpl.so filesudo cp /path/to/libmwgrimpl.so /path/to/installation/directory/libmwgrimpl.so
-
Create a
matlab.desktop
file to create a desktop icon for the applicationtouch ~/.local/share/applications/matlab.desktop
Open the .desktop file with nano
nano ~/.local/share/applications/matlab.desktop
And paste the following entries
[Desktop Entry] Encoding=UTF-8 Version=R2018a Type=Application Terminal=false Exec=/path/to/executable/file/matlab -desktop Name=MATLAB Icon=/path/to/icon/file
-
To launch matlab from terminal aliases are set as
alias matlab="exec /path/to/bin/matlab" alias matlabcli="exec /path/to/bin/matlab -nodekstop"
Now MATLAB 2018a is almost ready to be used from the application center, or from the terminal itself.
Conclusion
In this blog it shown how to install MATLAB 2018a is installed from 2 iso dvds provided by mathworks. All the settings are done in step by step manner and MATLAB should be ready to be launched, but there can be some font issue or some library issues which may lead to no window launching or simulink does not open etc. But they can be resolved by some tweaking.