Wednesday, August 22, 2012

Matlab and OS X Mountain Lion (10.8)

A little background

The current latest version of Matlab is 2012a. It was released for Mac OS X Lion (10.7) so requires X11 to provide the GUI. However, with the release of Mac OS X Mountain Lion (10.8), X11 is no longer provided by default from Apple. This poses a bit of a problem for Matlab 2012a.

What to do with Matlab 2012a on Mountain Lion?

While Mountain Lion doesn't have X11 and Apple isn't providing their version of X11, they are providing development support to the Open Source project that the Apple X11 was based off of: XQuartz.

So the solution is pretty simple: download and use XQuartz as the default XWindows System. This is the official solution by Apple as well.

Mathworks provides the instructions which more or less distill to download, install and reboot. You can read the steps here:

http://www.mathworks.com/support/solutions/en/data/1-IXBVKD/

Note: Remember to logout and restart the computer after installation to ensure it works.

The Caveat of 32-bit vs 64-bit

To make this works smoothly, you will want to ensure you have 64-bit Java, 64-bit Matlab and 64-bit Xquartz. If the Java is 32-bit for example then you would have to run Matlab in 32-bit mode as follows:
matlab -maci
It will not work otherwise. 

Native Cocoa Support for Matlab?

Mathworks has said that Matlab 2012b is being developed for OS X Mountain Lion (10.8) and as such will be supporting Cocoa natively; at that point it will not be dependent on XQuartz. You can see the information at:

http://www.mathworks.com/support/solutions/en/data/1-IXBVKD

Extensive details of the roadmap if that is your fancy can be found here:

http://www.mathworks.com/support/sysreq/roadmap.html





No comments:

Post a Comment