# Faculty of Mathematics

We recommend that programs are written in MATLAB. All undergraduate students at the University are entitled to download and install MATLAB on their own computer, running Windows, Linux, or MacOS; your copy should be used for non-commercial University use only. The files for download, and installation instructions, are available here. You will see that several versions are available; if you are downloading MATLAB for the first time (e.g. if you are a IA student) it is currently recommended that you choose version R2015b.
MATLAB is also available on the CATAM Managed Cluster Service (MCS) in room GL.04 of CMS, and also on the Computing Service public MCS computers, and the MCS computers at a number of Colleges.
Learning MATLAB
A booklet on learning to write MATLAB programs is available online [currently under review, but should not change subtantially]. Mathworks also provides MATLAB Onramp, an interactive tutorial on the basics which does not require MATLAB installation.

## Questions and Answers concerning the MATLAB software

Operating systems
MATLAB can be run under Windows, Linux, or MacOS 10.5 onwards (if your Apple computer is running 10.4 or less, the Faculty will try to do its best to provide the software).
FAQ
The rest of this document is a FAQ based on questions which have been asked about the installation and maintenance of the MATLAB software. Please read the FAQ before you submit a question to the CATAM Helpline, in case your question has already been answered.

#### Installation instruction for Windows

Q. Are there any step-by-step instructions on how to install MATLAB under Windows?

A. Yes there are. Instructions are available from Mathworks here for R2012a and later versions. Instructions for R2011a or earlier are shown here.

#### Number of simultaneous copies of MATLAB

Q. Is it possible to install the MATLAB software on more than one computer at the same time?

A. You may install the MATLAB software on 2 (but not 3) computers at the same time.

#### How do I move my copy of MATLAB to a new machine?

Q. How do I move my copy of MATLAB to a new machine?

A. The main page of your MathWorks Account lists your activated software. Click the Activate Another Machine link, and follow instructions. If the link does not appear, contact customer service at service@mathworks.com for information on how to move a license to a new computer.

#### Update an Expiring Licence

Q. When I start MATLAB there is a message that my license will expire soon. How to I update the license?

1. quit and relaunch MATLAB by right-clicking icon and choosing "run as administrator" if this option is available
2. help -> licensing -> Update Current LicencesOn Macs you may need to navigate to this menu via: home -> resources -> help
3. click on "update" button
4. restart MATLAB

#### Mac specific: PowerPC and Intel architecture support

Q. Which architectures are supported by which versions of MATLAB?

A. The last (and final) release of MATLAB which runs on PowerPC is R2007b. If you have a PowerPC Mac we may be able to obtain an old version of MATLAB for you to use - contact help@damtp.cam.ac.uk. For completeness, note that the first version of MATLAB to support Intel Macs was R2007a, and so the only two versions to support both architectures were the two 2007 releases, R2007a and R2007b.

In addition, note that Intel Macs with 32-bit (only) CPUs can only run up to 2010b, i.e., to run 2011a and beyond you must have a 64-bit CPU Intel Mac.

#### Mac specific: installation problems

Q. Which versions of OS X are supported?

A. When attempting to install MATLAB, if when you double-click the InstallForMacOSX icon nothing appears to happen, then you are probably trying to install a too new a version of MATLAB on an old version of Mac OS X. In particular, the last (and final) version which will install and run on OS X 10.4 (Tiger) is R2008b. The best solution to this problem is of course to update your OS X version to (at least) 10.5 (Leopard) but failing this we may be able to obtain a copy of R2008b for you to use. Contact help@damtp.cam.ac.uk.

Q. What if I see: "There was an unexpected exception: Can't load library: /Applications/MATLAB_R2009aSV.app/bin/maci64/libactivation.jnilib" ?

A. Immediately after the installation has finished, MATLAB attempts to run the Activate process. If this fails with the error above, try the following:

• Open the Java Preferences application from /Applications/Utilities/Java Preferences;
• In the section marked "Java Applications", drag the 32-bit item to the top of the list. Then close this application;
• Restart the activation client by double clicking on the MATLAB application in your Applications directory;
• Once MATLAB is activated and working properly, you can undo the change in Java Preferences.

#### Mac specific: installs OK but won't run

Q. MATLAB "quits unexpectedly" immediately after attempting to start it?

#### Mac specific: cannot print from a figure

Q. Printing from the GUI (i.e., using File->Print or Cmd-P rather than using the PRINT function at the command line) does not work?

A. See this page on the MathWorks site. In brief, you need to enter these 2 commands at a Terminal prompt:

sudo printf "Printcap /etc/printcap\nPrintcapFormat BSD\n" >> /etc/cups/cupsd.conf
sudo killall cupsd


#### Mac specific: default page-size always comes up as 'Letter'

Q. How do I change the default paper size once and for all?

set(0,'DefaultFigurePaperType','a4')


to a startup.m file that MATLAB will read during startup should fix the default paper size.

CATAM Helpline