Macintosh Matlab Survival Toolkit
Matlab Release 11 (version 5.3) presents a challenge to Macintosh users, whose latest and evidently last version is the Release 10 "stabilized, industrial-strength" Matlab v5.2. The MathWorks has not released a "good-will" patch for the Macintosh. Our long-standing enjoyment of easy Matlab portability will become increasingly hampered as the MathWorks distances itself from Release 10. Fortunately, Release 10 is in good shape and Release 11 is not much of an upgrade, so the degradation will be slow, assuming the company doesn't do anything to deliberately hasten it.
The present document (** under construction **) makes recommendations for coping with the present situation.
The Matlab license, like those of other companies in a similar non-competitive position, is designed to make you or your employer pay as much as possible, as frequently as possible, in order for you to continue enjoying the benefits of the software. As such, their license restrictions run deep.
We do not yet know whether the Matlab license allows the porting of MathWorks m-files and p-files between the WinTel and the Macintosh systems. (Presumably, they would not want you to port their Macintosh or WinTel m-files to the more expensive Unix arena.) Specifically, may such files be ported from a valid and otherwise unused PC license to the Macintosh system? Or is such a reasonable act precluded by the catch-all intended-use doctrine mentioned in the license? You and your lawyer must decide.
Do not use any of the suggestions in this document to justify the pirating of software for which you do not have a proper license to use.
Importing Alien M-Files
Macintosh users who have access to an otherwise unused license for an alien (PC or Unix) version of Matlab or a Matlab toolbox should consider porting the newer/bigger/better/different m-files (as text) and p-files (as pure binary) to their Macintosh Matlab v5.2.
The m-file new-lines can be converted to the Macintosh form by using the fixnl() function, available from the
Matlab Snack Bar.
The port will likely be successful for functions that do not rely on new built-in or Mex-file features.
Features Already In Macintosh Matlab 5.2
Some Release 11 features were already in the Macintosh Release 10, generally undocumented and sometimes not as well developed as in Release 11. They were said to be "experimental".
- end() -- Processing of "end" when used as an index with a customized object. A generic example of end.m can be found in at the
Matlab Snack Bar. Place this m-file inside any class that knows about its "size".
- openvar() -- Open a matrix in a spreadsheet; very limited in capability.
- plotedit() -- Facility for labeling elements a figure; no zooming or panning; rather limited in scope.
- rectangle() -- A HandleGraphics object, whose location is described by the "Position" property, unlike a "patch", which uses a list of vertices.
- str2double() -- Recommended over "str2num", for some unstated reason.
- uint8(), uint16(), uint32(), int8(), int16(), int32() -- Unsigned integers; only "uint8" has any manipulation methods.
Features That Need To Be Addressed
The following can be ported from the WINTEL versions of Matlab or they can be implemented more-or-less as m-files.
- clear classes -- Clear the class-path. Implement as "clr classes", where "clr.m" would know the keyword "classes", and "classes.m" would know how to tally the active classes, such as by crawling through the Matlab path.
- cellfun() -- Logical functions for cells. Make an m-file.
- complex() -- Combine real and imaginary parts. Make an m-file.
- saveas() -- Save figure as given format. Have not looked into it.
- uint16(), uint32(), int8(), int16(), and int32() -- Port the methods from "uint8".
- volumetric graphics -- These seem to be m-files, perhaps directly portable.
- system_dependent('builtin editor', 'on' or 'off') -- Not much can be done about "system_dependent" features, except to note that one should never write code that relies on them anyway.