Quick Review of Matlab 6.5 for Mac OS X

### Matlab is again available for Mac

Matlab is the standard in technical and scientific computing. It is probably the most used tool in numerical computing, although sometimes other tools would be more appropriate.

It is nice to see that Matlab is again available for Mac, after hibernating for a few years. But how nicely does the new version behave on Mac OS X?

### Fast delivery

The ordered copy of Matlab 6.5 for Mac OS X came in one week. Fast action. When I received my copy of Matlab I was waiting for Mathematica which was ordered almost two months before. (See also the review of Mathematica 4.2.)

Maybe I'll write a larger review of Matlab when I get enough experience. Now I'll just write a bit about the installation and the initial impressions.

### Installation

Installation of Matlab 6.5 for Mac OS X wasn't more difficult than installation on SGI or Sun systems. However, the instructions were a shock. I have grown accustomed to the ease of software installation on Mac OS X, even Unix software using Fink. Matlab installation was a mixture of Unix commands and a (terrible) graphical installer. At one point the software suggested logging in as root to make the necessary steps!

How about using Administrator rights when needed? This is done in other Mac OS X installers, and works flawlessly. I think the MathWorks people should have a real look at Mac OS X and how to do things here. This would help to make installation easier on other platforms also, I believe.

It is easy to see that the people at MathWorks have made little effort in this port. Well, at least Matlab is finally available for Mac OS X.

It has been some time since MathWorks decided to discontinue Matlab on the Macintosh. However, my experience of about 10 years is that Mac has been always a second class platform for Matlab, so nothing has changed.

It is sad to see that this package is still anchored in the previous millenium. The interface looks like Motif/Windows (or is partly even uglier, if possible). The system starts up slowly, and you have to make all kinds of Unix operations to make sure that the license manager is running.

### Initial impressions and screenshots

The Matlab kernel is a Unix program. The desktop interface is a Java program, which generates the Aqua look. The graphics display (plotting etc.) uses X Window System (X11).

There are some good points about Matlab. At least the software works, after the difficult installation. However, some things are different from standard Mac OS X applications, due to the Unix background of the software.

Some captures of the installation: at the beginning and Mac OS X is Unix.

Here is an example of the Unix background of Matlab on Mac OS X. You should add the matlab command to your shell path:

cd /usr/local/bin sudo ln -s /Applications/MATLAB6p5/bin/matlab . rehashThe command sudo requires administrator priviledges. After the above commands you should be able to start Matlab - if the license manager is running.

There are some problems with the usability of the graphical user interface. For example, hiding the Matlab application doesn't seem to work. Fortunately you can minimize to the dock all the Matlab windows using option-click.

There is lots of things to try, if only I had the time. A couple of years ago I used a few days to get familiar with the structured datatypes of Matlab, although I then found little use for them. This time there seems to be new features in the user interface, perhaps meant for those pesky Excel users who are not quite ready to forget the cell-based data layout.

Here is a screenshot of Matlab 6.5 on Mac OS X. You can see the command interface and a plot window under XDarwin and OroborOSX (X11).

Here is the open dialog for editing Matlab m-files. Doesn't look like a Mac OS X application, does it?

The Matlab help system is better than in the previous versions I have used. (Looks suspiciously similar to the Mathematica and Maple help systems.)

I am running Matlab under Mac OS X 10.1.5. I suppose Jaguar should be ok too, but this has to be tested. I'm waiting for my copy of Jaguar moderately impatiently, but an Apple representative said that copies will not be distributed before August 24th. Somehow I'm not completely convinced this is the case everywhere. At least there seems to be lot of Jaguar reviews popping up and feeding the frenzy.

### Conclusions

The people at MathWorks reminded me that Mac OS X is a Unix operating system. You need XDarwin and OroborOSX to make the system work. I did have those already installed, but making this system work is quite non-trivial if you don't know Unix beforehand.

I hope there will be a free upgrade to a fully Aqua-based version of this software, when (if) it becomes available. This would be fair considering the price of the software.

### Further information

See the MathWorks Mac page for detailed information about the product.

### Update on Jaguar (Mac OS X 10.2)

Matlab 6.5 has problems on Jaguar (Mac OS X 10.2). Matlab doesn't seem to work with Jaguar. When trying to start the license manager there is a error message

66 12:54:57 (lmgrd) "XXXXX.local.": Not a valid server hostname, exiting. 67 12:54:57 (lmgrd) Valid server hosts are: "localhost"Perhaps this has to do with the Rendezvous technology of Mac OS X. The hostname reported above seems to be the same as given by Rendezvous.

### Matlab runs on Jaguar, but without the desktop interface

MacMerc had information on how to get Matlab 6.5 running on Jaguar (Mac OS X 10.2), although without the Aqua-based desktop interface. Here are the steps:

- The license file /Applications/MATLAB6p5/etc/license.dat has to be modified to use the rendezvous hostname (look at the line in the file with the word SERVER).
- From the terminal run the command
setenv DYLD_INSERT_LIBRARIES /usr/lib/libncurses.dylib

- Finally, when starting Matlab, start from the terminal with the command
matlab -nojvm

You'll get Matlab without the desktop interface. Everything else should works fine.

### Fix for Matlab 6.5 on Mac OS X 10.2

MathWorks has released a fix for making Matlab 6.5 run on Mac OS X 10.2. The bugs and enhancements fixed by this patch are:

- License Manager errors for individual licenses that were caused by file ownership or dynamic hostname issues have been improved.
- The problem caused by typing any characters along with the Option Key has been fixed.
- The problem of the Simulink Simulation Diagnostics window not brought to the foreground when a block error was detected has been fixed.
- If a License Manager error occurs, an error message window will now display.

### Getting Matlab to run on Panther (Mac OS X 10.3)

You also need to run an updater to make the graphical interface work under Panther. (The command-line version started with `matlab -nojvm` works ok.)

If you have trouble setting up Matlab so that the licence manager starts up automatically, the instructions at MathWorks seem to help. I strongly dislike the flexlm system - it is fine on a multi-user system, but overkill on a personal machine.

### Matlab 6.5 on Apple G5 machines

You need to have the following (or newer) version of Matlab on G5 PowerMacs:

MATLAB Version 6.5.1.200223 (R13) Service Pack 1

...

Operating System: Darwin 7.0.0 Darwin Kernel Version 7.0.0: Wed Sep 24 15:48:39 PDT 2003; root:xnu/xnu-517.obj~1/RELEASE_PPC Power Macintosh

Java VM Version: Java 1.3.1 with "Apple Computer