Friday, June 09, 2006

Matlab and Intel Macs

I just learned some great news. Apparently, those of us who have Intel Macs can in fact run Matlab on them.

The work-around goes like this.
1) Open X11 (you need it to display graphics)
2) Open Terminal (supposedly Matlab runs faster in Terminal, plus you have access to the scrollbars and the clipboard, which X11 doesn't play nice with).
3a) If you use bash, set your display by entering
export DISPLAY=:0.0

3b) If you use tcsh, set your display by entering
setenv DISPLAY :0.0

4) Start Matlab without the Java-based GUI
./Applications/MATLAB704/bin/matlab -nojvm

Of course, this means you won't have access to the fancy GUI, which I've grown accustomed to over the years, but there are some suggestions in the post above on how to configure a code editor (i.e. Textedit or emacs) to allow you to quickly open files from within Matlab. And if you want a full-fledged file manager, well there's always Finder which is easy to use.

Additionally, the forum post has some suggestions on how to place step 3 in your login file, and some neat commentary on running Matlab with Bootcamp or Parallels, not to mention the bleak outlook on when full Intel Mac support will be available.

Unfortunately, none of this helps me run Matlab at home, since I use a license manager at work that is blocked to the outside world. So now I have to decide if I want to spend $500 for a stand-alone license, or deal with a sluggish network connection, something I've avoided to date.

This reminds me of another tidbit. If you would like to automatically set your display when using ssh (you need to have X11 open first), simply use the -X flag as follows.
ssh -X user@myserver.edu

So, if you open X11 first, and then use Terminal to ssh and run Matlab on a a remote server, you'll have all the bells and whistles of graphics display and access to your local clipboard without much fuss. This is a heck of a lot easier than using setenv DISPLAY and trying to figure out your DHCP IP.

Your only worry now is to pray your bandwidth can keep up with the gigabytes of data you're try to process.