How do I add Matlab to the main menu?

Solution 1:

I found some useful instructions which work for me (Ubuntu 10.04).

  • How to Install MATLAB on Ubuntu Linux
  • How do I create shortcuts, aliases, or links to MATLAB? How do I put MATLAB on the dock?

Screeshot of the Launcher Properties The command to copy-paste after having checked your version: /usr/local/MATLAB/R2012b/bin/matlab -desktop

Solution 2:

Although I'm using a more recent version of Ubuntu (and Matlab), this worked great for me: I just installed Matlab 2012b on Ubuntu 12.10 and followed up by installing the matlab-support package in the Ubuntu Software Centre:

sudo apt-get install matlab-support

(As per this answer in a related question: https://askubuntu.com/a/140078/16835)

This will add a desktop icon/launcher, as well as allow you to fix the compiler linking problem.

Solution 3:

Its also nice to not have two icons in the launcher while MATLAB is running. To accomplish this, edit the *.desktop file containing the launcher for MATLAB (grep for matlab in ~/.local/share/applications) add add the following line to the bottom

StartupWMClass=com-mathworks-util-PostVMInit