Matlab is installed in ubuntu but i am unable to open it

After complete installation of MATLAB, i am not able to open it by applying following command in terminal.
./matlab
Operating system: UBUNTU 18.04
Following is the photo of directory where i installed MATLAB.

Risposte (2)

If you try to execute something like ./matlab from your terminal you tell the shell to run an executable command "matlab" in the current directory. That would work if you were in the bin-subdirectory of your matlab-installation directory, or in a directory where you had a link matlab pointing to that executable.
Further, it seems that you've installed matlab with ~you/Documents as the installation-directory. That's not pretty. Matlab is not a document. On my machine I have all matlab-releases in a directory /usr/local/MATLAB/, and when I install matlab I do it as super-user so that it get properly installed with executables (links to /usr/local/MATLAB/R2020a/bin/matlab etc) in /usr/local/bin. That way I will have matlab on the shell-path so that I can start it from the shell like: matlab -nodesktop (my prefered way).
I suggest that you re-install matlab as super-user and select to create links in /usr/local/bin (that is the default suggestion IIRC). If you cannot do that and have no user with sys-admin privileges at hand I think you should still move the full installation from your Documents directory, and create a link to the matlab-executable in the bin-directory from a directory on the path you have in your shell (perhaps ~/bin).
HTH

7 Commenti

Output of command ./matlab is following
actually reason for changing the directory was that there was not enough space to install matlab in
usr/local
You should run the activation as the same user with which you run Matlab. So if you run Matlab as root, you should provide root as the username. At least that is how I understand it.
yes i activated it by following commands in terminal in directory
sh activate_matlab.sh
after that i am able to open matlab by applying the following command in terminal
./matlab
but i think there is still something missing. Command window of matlab says
The desktop configuration was not saved successfully
here is the screenshot
Does the file exist already - with some peculiar permissions? Does the directory exist? Do you have write permissions in that directory. These are typically the things I've messed up when that error-message comes up...
Issue seems to be resolved by taking ownership of the .matlab folder in the home folder with the following command "<username> your username"
sudo chown <username> -R ~/.matlab
but savepath ends with warning.
That seems to be a problem due to your call to matlab trying to save the path in the matlab installation/local directory - that is overwrite the pathdef of your matlab-installation, possibly with the path as you have after starting matlab (when you "typically" might have added additional directories of yours where you have your matlab-functions and toolboxes.). That's something that I've made sure to never do. My path-setups I put in my startup.m file (more modern use would be to have a your pathsetup.m in your .matlab-directory.). My suggestion would be to disable write-permissions in the matlab-installation-directories (just to avoid mistakes of overwriting important matlab-files, that will not be fun and will happen just before "the important deadline".)
Also: make sure not to put the directories of your own in the toolboxes subdirectory. That will mess up matlabs path/cashing/JIT-handling. Put those in some directory ~username/matlab directory, and make sure that they are added to the path on startup.

Accedi per commentare.

Try clicking the "Error -9" tag on the right hand side of this page.
Or else call the Mathworks for fast and free technical support.

Categorie

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by