![]() click to enlarge Figure 1: The MATLAB desktop |
MATLAB is mathematical software useful for a variety of functions, and is frequently used by engineers for diverse applications and development projects. Originally produced in 1984 primarily for matrix algebra, it has blossomed into an all-purpose toolkit useful in many disciplines and with its own loyal following.
I have long used this software for verification of many of the matrix operations routinely performed in statistical analysis. At this level, I consider myself a coder rather than a programmer and, as many long-time users will recognize, it is the programming that gives this software its immense power and flexibility. So, what’s new in the latest version? Quite a bit but, first, let’s look at some of the nuts and bolts for those not intimately familiar with the product and its many add-ons.
System requirements/installation
MATLAB will run on Linux, Mac, Solaris and Windows machines. As this review was done on Windows, I’ll concentrate on these requirements. For the 32-bit product, at least a Pentium III processor is needed with 510 MB of disk space. One GB of RAM is recommended, although it will operate with 510 MB. For the 64-bit product, faster, more sophisticated processors are needed.
The software installed on my old 1.2 GHz Pentium 4 (37 GB HD, 1 GB RAM) in just a few minutes. No problems were encountered. The only holdup is getting the license key, and this is done over the Internet. There were no conflicts with an older version of MATLAB already installed. The Wizards nowadays all but ensure a painless installation.
Documentation
There used to be a number of manuals that came with an individually licensed copy, and I have always appreciated their brevity and clarity. The ‘Getting Started with MATLAB’ volume is my favorite, as all I needed were a few commands to start off with, generating and manipulating the vectors and matrices. It includes instructions for
![]() click to enlarge Figure 2: Simple 3-D contour plot |
elementary graphics, and an overview of the Desktop, as well as a very brief introduction to programming, creating graphics and the development environment. The other manuals are still accessible, but now must be downloaded from the Internet. These are the manuals for Mathematics, Graphics, Programming, and the Desktop Tools and Development Environment. It is rather telling that the Programming and Graphics manuals are much larger than that for Mathematics.
The main working environment
The desktop (Figure 1) contains all of the tools necessary to find and navigate between files, review the command history, search help areas, and access the command window to either type in code, or cut and paste it, as well as enter variables and run functions.
The above default configuration can be modified in many ways to suit individual needs. Tools may be visualized, hidden, re-sized or moved and, of course, fonts are customizable. The File/Prefer-ences options allow further customization by offering choices in file settings, command window options, Editor/Debugger features, and copy templates.
To the new user, the Help browser may become invaluable as it allows easy access to the Contents, Index, Search and Demo functions. The Demos are a fast and easy way to see how the code works to implement many useful features of the software such as matrix algebra, graphics, transformations, splines, differential equations and practical applications. As more experience is gained with this program, the search and debugger features will become more and more appreciated.
Graphics
One of the finest analytic tools available to a data analyst is the graphic. In (hopefully) clear and simple terms, this tool has the ability to clarify many complex concepts and immediately highlight trends and aberrancies. MATLAB has the capacity to fairly quickly produce and annotate a variety of colorful graphics to almost any degree of complexity that the engineer might need (Figures 2 and 3).
These graphics can take on added value as teaching tools, such as the illustration of methods of solving inequalities and their implications on the design space (Figure 4).
The code to generate many of these figures is surprisingly simple as MATLAB has many precoded functions that allow the most bang for the least code.
Applications development
Here is where the program demonstrates its most powerful features. It has long been utilized by engineers and scientists for its ability to ‘get the whole problem under one roof.’ For those of us in a hurry, it may be expedient to resort to bits and pieces of several programs to get the job done, but to the experienced MATLAB programmer it is straightforward to do all of the data analysis, graphics and reporting in one program. I was reminded of the power of this software at work recently while I was struggling through some seemingly not-too-complex mathematics behind an academic paper dealing with a new technique for biological high-throughput screening.
MATLAB code was presented with supplementary material that purported to show how the technique could be easily implemented. I requested that one of our engineers, an experienced MATLAB programmer, implement the code and present a usable tool. He was initially as puzzled as I was, as the code seemed to be hard-wired to the
![]() |
author’s instrument and techniques and very poorly annotated. He used the word ‘spaghetti’ in describing the programming technique (or lack of it). Due to his expertise, however, the technique was implemented in a reasonable time, and he was able to produce several tools that could be easily used by the biologists. Now when the data is entered in a standard format, the program quickly parses this data and produces graphics to display illuminating relationships between biological mechanisms of action.
The strengths and weaknesses of what MATLAB implements would take far more room than is allotted here (mostly for the strengths), so I will merely introduce a table (from the MathWorks Web site) reflecting some of the latest features in the current version.
The software never leaves even the experienced programmer without helps, however, and there are a variety of debugging tools available. I was particularly pleased with the gold bars that appear on the right-hand side of my code editor, giving warnings that some assigned values might never be used or advising that brackets are not needed in a particular application. These helps are non-intrusive as the user may ignore them, or merely mouse over them to get the information. Standard features such as setting breakpoints, evaluating cells and functions, and searching for texts are all included on the menu bar.
Of course, the power of the basic package has been extended by the many Toolboxes now offered. This is a numerous list consisting of add-ons in the areas of mathematics and optimization, statistics and data analysis, control systems, signal processing and communications, image processing, tests and measurement, computational biology, financial modeling, applications deployment, and database connectivity. (As the list is ever expanding, the interested reader is advised to check the Web site.)
Summary
As a novice programmer (coder is a better description), I have always found the level of support with this program to be quite useful. Other than the obvious, i.e., the manuals and online help, MathWorks offers an active users’ group, an FAQ area on its Web site, an excellent technical support team, and periodic workshops and
![]() click to enlarge Figure 4: Graphical approach to solving inequalities |
conferences. As a result, the new user can be secure in the knowledge that he is not alone, and a variety of helps are available. As a result of the already formed functions, the numerous programs already written and posted to the Web site, and the array of expertise available, it is possible to do much with a lesser effort than is originally thought. This is not to minimize the effort needed to implement most complex problems, and MATLAB is not for the programming averse, but it has been found to be very useful by a variety of professionals in many areas. The reader is never asked to take my word for it. However, interested parties can always download a free trial copy and are strongly encouraged to form their own opinions.
TABLE 1: Latest MATLAB Features
Development Environment
• M-Lint code checker improvements, including ability to disable classes of warnings, support in Simulink Embedded MATLAB Editor, support for MATLAB Compiler messages, and display of messages in Japanese
• New file comparison tool for easier assessment of differences between any two M-files
• Enhancements to debugging functions, including an option to save breakpoints that can be restored in a future session
• Improved inspection of workspace variables with new statistical columns in the Workspace Browser, and the ability to view time series objects in the Array Editor
• M-code generation from Import Wizard, for programmatic access to interactively imported files
• New look and feel on Linux and Solaris platforms
• Help browser support for exact-phrase and wildcard searches
Mathematics
• New ldl function for full factorization and solving for Hermitian matrices
• New permutation vector option for lu, luinc and ldl functions
• Upper and lower triangular factor options for chol and ldl for improved performance and memory efficiency
Graphics
• Interactive page layout and print preview allowing customization of plots and page position before printing
• Support for mouse scroll wheel in figure Zoom Tool
File I/O
• New functions giving access to more than 200 routines in the HDF5 C API library, supporting reading and writing of complex data types, HDF5 data subsetting capabilities and other HDF5 features.
Lareg Dataset Handling and Performance
• Elimination of temporary memory copies when calling M-file functions and some built-in functions in place (i.e., x = myfunction(x)) for easier handling of large data sets and improved performance
• Ability to read and write MAT-files greater than 2 GB on 64-bit platforms via new switches to the save function
• Ability to view larger arrays in Array Editor
• Full JIT/Accelerator support for 64-bit platforms, allowing faster code execution
Availability
• Individual $1,900
• Group license available
The MathWorks, Inc.
3 Apple Hill Drive, Natick, MA 01760
1-508-647-7000; Fax:1-508-647-7001
[email protected]
www.mathworks.com
John Wass is a statistician with GPRD Pharmacogenetics, Abbott Laboratories. He can be reached at [email protected]