Instructions for setting up MATLAB
Last updated 2020-07-20 by Adam Lu
Before starting MATLAB
-
The following is only needed if you have used MATLAB with this account before and MATLAB has been upgraded to a newer version since
-
Make sure old
pathdef.mfiles are removed by typing this command in a terminal:rm ~/pathdef.m
-
Within MATLAB
-
Helpful preference settings
- Under
Preferences -> MATLAB -> General -> MAT-Files, choose MATLAB Version 7.3 or later. This will allow saved variables to exceed 2 GB on 64-bit systems, and allow the usage of thematfile()function. - Under
Preferences -> MATLAB -> General -> Source Control, choose None. This will prevent git from slowing things down - Under
Preferences -> Parallel Computing Toolbox:- Click on Cluster Profile Manager
- Click on Edit
- In the field
Number of workers to start on your local machine, type 12.
- Under
Preferences -> MATLAB -> Keyboard -> Shortcuts -> Active Settings, changeEmacs default settoWindows default set
- Under
-
Commands to type within MATLAB for chalkboard only:
- Always use Software OpenGL (chalkboard does not have a graphics card yet)
% Always select OpenGL opengl('save', 'software') % To revert: % opengl('save', 'none')
- Always use Software OpenGL (chalkboard does not have a graphics card yet)
-
Add very useful directories to your search path:
- Click on
Set Path - Click on
Add Folder..., type or find these paths underFolder Nameand add them:/home/Matlab/Settings_Matlab/home/Matlab/Downloaded_Functions/home/Matlab/Adams_FunctionsNote: Please avoid clicking onAdd with Subfolders...because that would also add older versions of code saved in .git directories. If you must add subdirectories to your path, add them individually!
- Click on
Saveand click yes if it prompts you to save in your home directory.- This will create a file called
pathdef.min your home directory. - If you start MATLAB from the home directory (which is usually the case),
pathdef.mwill be read and the saved paths will be loaded. - If you start MATLAB from a directory without
pathdef.m, only the default paths will be loaded.
- This will create a file called
- For more on this, consult these instructions
- Click on