skip to content

Computer-Aided Teaching of All Mathematics (CATAM)

 
Access to MATLAB
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 purposes only. The instructions for download and installation are available here. Several versions are available; if you are downloading MATLAB for the first time it is currently recommended that you choose version R2017a or later, and install from the MathWorks site as described.
MATLAB is also available  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. 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 instructions

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

A. Yes there are. Instructions are available from Mathworks 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?

A. Follow these steps:

  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?

A. Make sure that your X server is working properly - MATLAB needs a working X server. To test this, in a Terminal enter the command 'xterm'. The X server should start up (a large X icon appears in the Dock) and an xterm terminal window should appear. Make sure that this xterm accepts input and has not frozen up and can be exited by pressing CTRL-D. You should be able to start up additional xterms by choosing Applications/Terminal from the X11 top menu, and you should also be able to Quit X11 from this menu. If X11 does not behave in this way, you should re-install it. If you are running OS X v10.5 then go to the XQuartz project website and download and install the latest version. If you are running an earlier version of OS X (but see the previous FAQ question and answer!) you will need to install (or re-install) from your OS install DVD. If you are running OS X v10.6, try to re-install from your OS install DVD and (if that fails to fix it) then try the XQuartz project website.

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?

A. Adding:

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

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

CATAM Helpline
Last modified: 27th July 2018