# Oscar: MATLAB ## Loading and Launching MATLAB 1\. Open the Terminal and use the following commands at the command line. 2\. `module avail matlab` to list all the available matlab versions. 3\. `module load matlab/R2018a` to load matlab. This command should return the confirmation “*module loaded*”. 4\. `matlab` to launch the MATLAB app. ## Installing MATLAB Packages such as YALMIP MATLAB script packages, such as [YALMIP](https://yalmip.github.io/ "https://yalmip.github.io/"), can be installed directly by the user on their Oscar account. These instructions assume you are using Oscar via the VNC client. 1\. Open the Terminal on your VNC session. 2\. Navigate to your home folder by typing `cd ~` 3\. `mkdir -p MATLAB` 4\. `wget -O yalmip.zip https://github.com/yalmip/yalmip/archive/master.zip` 5\. `unzip yalmip.zip` 6\. In MATLAB, add the YALMIP-master directory to your path.
1.
In the MATLAB file browser, navigate to the MATLAB folder you created in your home folder. `cd ~/MATLAB`
2.
Right click on the YALMIP-master folder.
3.
Select Add to Path > Selected Folders and Subfolders. This adds the YALMIP folders to your path.
7\. To save your MATLAB path, use the savepath command in the MATLAB command prompt. `savepath ~/MATLAB/pathdef.m` YALMIP also requires a solver like [SDPT3](https://github.com/SQLP/SDPT3 "https://github.com/SQLP/SDPT3"). The steps below add SDPT3 to MATLAB. 1\. Open the Terminal. 2\. `cd ~/MATLAB` 3\. `wget -O sdpt3.zip https://github.com/sqlp/sdpt3/archive/master.zip` 4\. `unzip sdpt3.zip` 5\. In MATLAB, add the sdpt3 directory to your path.
1.
In the MATLAB file browser, navigate to the MATLAB folder you created in your home folder. `cd ~/MATLAB`
2.
Right click on the sdpt3-master folder.
3.
Select Add to Path > Selected Folders and Subfolders. This adds the SDPT3 folders to your path.
6\. To update/save your MATLAB path, use the savepath command in the MATLAB command prompt. `savepath ~/MATLAB/pathdef.m`