Installing matlab in linux

How to install MATLAB in Ubuntu 20.04

MATLAB from Mathworks is a platform-independent software for solving mathematical problems and graphically displaying the results. The software package is best-known for tools for calculating and simulating complex mathematical and technical problems. Here we learn the steps to install MATLAB on Ubuntu Linux and how to create its Desktop shortcut…

In addition to the basic module, a whole range of extensions for MATLAB is available, which is known as Toolbox. This includes Simulink, a graphical user interface block-oriented development platform for the modeling, simulation, and analysis of dynamic, non-linear, and event-driven systems, that can be used to model and simulate systems interactively.

This programming platform is used for a wide range of tasks in industry and at universities, especially in control engineering and technical mechanics. It offers comprehensive functionality for mathematical calculations and visualization as well as a powerful programming language.

The functionality of MATLAB can be used in two ways: one is by using an interactive calculation and simulation environment and the other by calling self-written MATLAB functions that use the numerical methods of MATLAB.

When it comes to numerical procedures, this platform offers almost everything such as solving linear systems of equations, calculating zeros for any functions, numerical integration, and more.

The thing is to be noted, MATLAB is a paid application and available to easily install for Windows 7 or 10, macOS, and Linux. And here we let you know the steps to be used for Linux such as Ubuntu.

Steps to Install MATLAB for Ubuntu 20.04 Linux.

The steps given here will not only applicable for Ubuntu 20.04 LTS but also work for Ubuntu 21.04 and 18.04 including Debian, Linux Mint, MX Linux, Zorin OS, Elementary OS, Deepin, CentOS, OpenSUSE, Kali, RHEL, and other Linux distros.

1. Download MATLAB R2020b Linux version

While writing this tutorial, the latest version of Matlab available to download was R2020b, however, that doesn’t mean the process of its installation will be changed, if you are one some other latest version.

  1. Open the browser and go to www.mathworks.com
  2. Click the download button for the current release
  3. Enter your email ID to Sign in, if you don’t have an account with MathWorks, then simply Sign up for it.
  4. Select between two options Get Trail or Link your licenses. Click on the Get Trail button, you can link your license, if you have, later otherwise continue using the trial version until it gets expired.
  5. Download the installer for Linux.

2. Extract Zip file

The MATLAB Linux installer will be in zip format, thus to get started with its installer, first we need to unzip the same.

  1. Open the Command terminal
  2. Switch to the Downloads directory because the files we download from the browser automatically go to that. Here is the command: cd Downloads
  3. Check the availability of files- ls
  4. Installer Unzip– sudo apt install unzip
  5. Create a folder to extract files- mkdir matlab
  6. Unzip the MATLAB file- unzip -qq matlab*.zip -d matlab
Читайте также:  Что такое загрузочная флешка линукса

3. Run MATLAB Linux Installer on Ubuntu 20.04

Once the extraction of the zipped file has been completed, the next step is to run the installer that will offer a graphical user interface installation wizard.

Switch to the directory we have created to extract MATLAB files:

Now, display all files, inside it:

Run installer

4. Login with MathWorks Account

Enter your Mathworks Account email address and password to use the corresponding available License information.

5. Select the available License

As we are using the Trail version, the license available corresponding to it will show there. If you have purchased one that will also appear in the “Select License” area. Alternatively, we can also enter the Activation key manually.

6. Select Matlab Products or Toolbox to install

All the Toolbox packages will appear, by default, all will be marked to install, if you want some particular Toolbox then choose that only and uncheck the others.

7. Select Destination address

Leave the default folder as it is unless you don’t want it to some other place and then select the NEXT button.

To run the MATLAB directly from using the Command line terminal, we have to create a Symbolic for its script. For that check the box available for it.

Note: In case you forget to check this option then we can create a symbolic link after the MATLAB installation using the following commands:

If you have followed the above steps then it will be like this:

9. Start the application

Once the installation is completed, to start the MATLAB software, on your command terminal type:

10. Create Matlab Desktop Shortcut Linux

If you are on Ubuntu or using some other Linus Distro and want to create a MATLAB desktop shortcut icon to easily run it. Then follow the below steps:

1. Open a command terminal

2. Create a Desktop Shortcut file for MATLAB using the command:

3. Copy-paste the below lines

Note: Change Exec Path, in case you have installed Matlab in some other directory apart from the default one showing in the above-given lines.

4. Save the Desktop Shortcut file by pressing Ctr+X and the type Y followed by the Enter Key.

5. Now, go to the Desktop, right-click on the created file and select the “Allow Launching” option.

6. Double click on the Ubuntu MATLAB desktop shortcut to start the application.

11. Uninstall

To remove the installation of Matlab, we just need to delete its folder and Syslink created by it. Here we are using the default path suggested by the software to install it, thus we are using that with the remove command. If you have used any custom directory then use the path of the same:

Источник

Installing MATLAB on Linux

MATLAB is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages.

Читайте также:  Windows graphics card test

In this article, we will discuss how to install MATLAB in Linux. For installing MATLAB we will first register on Mathswork, and then we will download the software. Let’s discuss this in detail.

How to log in or register on Mathworks: Go to https://in.mathworks.com/login to log in or click create one to register your account using your school or work email address.

Downloading the software

Before downloading you must activate your license and then proceed with the following steps. Go to your account by clicking this link https://in.mathworks.com/mwaccount/. You will see a download option in your active licenses, click on it and select Linux to download the zip file required for installation.

Note: You must also install 7z to extract the zip file.

Installing MATLAB

  • By default, the zip file will be downloaded to the Downloads folder.
  • Create a folder and move the downloaded zip file named matlab_R2021a_glnxa64.zip inside it.
  • Open a terminal inside the folder and enter the following command to extract the zip file.
  • 7z x matlab_R2021a_glnxa64.zip

Now, enter the following command and enter your system password to install MATLAB. sudo ./install

  • A window will open up and will ask you to sign in to your Math works account.
  • Accept the terms of the license agreement and click NEXT.
  • Select the license you have or enter the Activation key if you have any and click NEXT.
  • Type your Linux username in the Login Name text field and click NEXT.
  • Select a destination folder for installation and click NEXT.
  • Select the products you want to install.
  • Enable create symbolic links to MATLAB scripts and select Desktop as your destination.
  • Confirm the selections and begin the installation. NOTE: Your system should be connected to the internet as the setup will download the necessary packages.
  • A Desktop shortcut will be created after installation is complete, open a terminal in desktop and enter ./matlab to start MATLAB Desktop.

Источник

Installing matlab in linux

You need to have the unix version of Matlab dvd or dvd image to install it in linux mint.

Two different approaches are going to be adopted:

1. If you are the only user who will use matlab then follow the first step ( #1 ).

2. If there are several users who will use matlab with several user accounts then follow second step ( #2 ).

#1. installing in home directory:

installing matlab in /usr/local (explained in the second section of this tutorial) is troublesome and requires root permission in several steps. installing it in the home directory is the easiest way.

just follow the steps below:

1. mount the iso (better use furiusisomount)

2. go to the newly mounted volume

3. right click mouse and select ‘open in terminal’ & enter the command ./install

3. double click on the ‘install’ file and select ‘run in terminal’ .

4. Now a matlab installation window will appear. go through the general processes like ‘next‘ , ‘accept‘, check ‘install without internet‘, put your license key where it is needed.

5. When matlab installation folder selection window appears erase all the text in the text box and put /home/Your_user_name/Matlab and continue . (the default path is /usr/local/Matlab/Rxxx, don’t use it)

6. Now everything will go smooth, brows your lic_standalone.dat file when needed.

Читайте также:  Драйвера для vpn windows 10

7. after completing the installation enter the following code into terminal:

sudo ln -s /lib/i386-linux-gnu/libc.so.6 /lib/libc.so.6

this is for a warning that libc.so.6 can not be found.

Now matlab is installed in /home/user/Matlab directory.

go to the home/user/Matlab/bin directory and double click on matlab and ‘select run in terminal’ or enter command in terminal:

/home/user/Matlab/bin/matlab

here user = your user name

or, to run from the menu, follow these steps:

1. in the terminal enter this code:

sudo gedit /usr/share/applications/matlab.desktop

2. copy paste the following lines into the newly opened .desktop file

[Desktop Entry]
Exec=/home/user/Matlab/bin/matlab -desktop
Icon=/home/user/Matlab/X11/icons/matlab64c_icon.xpm
Type=Application
Comment=Matrix Laboratory
Name=Matlab
Categories=Development;

user will be replaced by your user name. (must).

For Exec and Icon, the path should be correct i.e you must change «user» according to your path. (must).

in «Name= Matlab » you can change the name whatever you want.(optional).

in «GenericName» you can put whatever you want. you can cut off this line too.(optional).

save & exit the .desktop file.

a new entry named «Matlab» will be added in the menu under the programming section.

3. now go to menu->programming->Matlab.

Enjoy. your Matlab environment.

#2. installing in /usr/local directory:

if there are several users in a single pc & each of them has individual user accounts and need to use the same application then it is required to install it in the directory indicated by default in matlab installation process i.e in /usr/loal

1. mount the iso (with furiusisomount). if you already have the contents of the iso copied elsewhere then skip this step.

2. create a directory /home/user/matlab.(it’s temporarilly, after installation this can be deleted.)

run in terminal (to create the directory):

mkdir /home/user/matlab

user=your user name.

copy the contents of the iso (archives, bin, etc, java, sys, install. ) in your /home/user/matlab folder.

If you want to avoid copying, then mount the iso with this command:

sudo mount -o loop path_to_the_iso_file_matlabxxx.iso /mnt

cd /mnt

sudo ./install

now you can skip the next step(3) and after finishing the installation clear the mnt directory with sudo umount /mnt

3. run these commands in terminal:

sudo chmod 777 -R /home/user/matlab

cd /home/user/matlab

sudo ./install

here user=your user name.

4. now the installation gui will be run. go through the processes as, it is known how to install it from a gui (explained a little in section #1 ).

5. after installation run this code:

sudo ln -s /lib/i386-linux-gnu/libc.so.6 /lib/libc.so.6

this fixes a warning that libc.so.6 can not be found.

go to the /usr/local/MATLAB/R2011b/bin/ directory and double click on matlab and ‘select run in terminal’ or enter command in terminal:

/usr/local/MATLAB/R2011b/bin/matlab

or, to run from the menu, follow these steps:

1. in the terminal enter this code:

sudo gedit /usr/share/applications/matlab.desktop

2. copy paste the following lines into the newly opened .desktop file

[Desktop Entry]
Exec=/usr/local/MATLAB/R2011b/bin/matlab -desktop
Icon=/usr/local/MATLAB/R2011b/X11/icons/matlab64c_icon.xpm
Type=Application
Comment=Matrix Laboratory
Name=Matlab
Categories=Development;

in «Name= Matlab » you can change the name whatever you want.(optional).

in «GenericName» you can put whatever you want. this line can be cut off too.(optional).

save & exit the .desktop file.

a new entry named «Matlab» will be added in the menu under the programming section.

3. now go to menu->programming->Matlab.

Enjoy. your Matlab environment.

the above process was tested on Matlab R2011b. other version should work too.

Источник

Оцените статью