Connect with us

Software

How to execute matlab from terminal in Ubuntu (Linux)?

Published

on

How to execute matlab from terminal in Ubuntu (Linux)?

While trying to install Matlab [1], it generally gives an error stating “matlab: command not found.”. Here, we provide a solution to this error.

This error occurs when the Matlab is not in your path. This could be because during installation it was unable to write to the default location, i.e., /usr/local/ and you have installed the Matlab in some other location. Or you have installed Matlab successfully but not added to the path. Let’s go through the solutions for both situations.

1. Running installer with sudo permission

When you run the installer without the sudo permissions (./install), it will not install Matlab in the default location stating “cannot create a folder in /usr/local” or “cannot write to /usr/local/“. You need to provide permissions using the sudo command. But when you try to run the installer with the sudo command then it keeps running without displaying anything.

So, to run the installer with the sudo command, you will first have to allow the root user to access the running X server. Open a terminal (Ctrl+Alt+T) and paste the following command.

$ xhost +SI:localuser:root

Now, you can run the installer with the sudo command as shown below.

$ sudo ./installer

2. Adding to the path

Open the bashrc file.

$ sudo nano ~/.bashrc

Add the following command at the end of the file.

$ export PATH=$PATH:/usr/local/MATLAB/R2022a/bin

Here, R2022a is the Matlab version. Replace it with your installed version.

Save and close the file.

$ source ~/.bashrc

Now, you can type $ matlab in the terminal to run the Matlab.


References

  1. MATLAB. (2022). version 9.12.0 (R2022a). Natick, Massachusetts: The MathWorks Inc.

Dr. Muniba is a Bioinformatician based in New Delhi, India. She has completed her PhD in Bioinformatics from South China University of Technology, Guangzhou, China. She has cutting edge knowledge of bioinformatics tools, algorithms, and drug designing. When she is not reading she is found enjoying with the family. Know more about Muniba

Software

How to calculate binding pocket volume using PyVol plugin in PyMol?

Published

on

How to calculate binding pocket volume using PyVol plugin in PyMol?

Previously, we provided a tutorial for PyVol plugin [1] installation. In this article, we will calculate the binding pocket volume of protein using the same plugin in PyMol [2]. (more…)

Continue Reading

Software

How to generate electron density map using Pymol?

Published

on

How to generate electron density map using Pymol?

Electron density maps are available for most of the protein structures in PDB. Therefore, in this article, we are using PDB to generate electron density maps in Pymol.

(more…)

Continue Reading

Software

Installing PyVOL plugin in Pymol on Ubuntu (Linux).

Published

on

Installing PyVOL plugin in Pymol on Ubuntu (Linux).

PyVOL [1] is an excellent plugin of Pymol [2] for pocket visualization of proteins. In this article, we will install the PyVOL plugin in Pymol on Ubuntu. (more…)

Continue Reading

LATEST ISSUE

ADVERT