[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MATLAB




Having used Matlab extensively in my thesis work (as almost everyone does
here at Caltech), I have some strong opinions about it.  To me, Matlab
exemplifies both the best and worst aspects of a domain-specific language
(I hesitate to say "little language" because Matlab processes have an
annoying tendency to grow to 200M+ at the drop of a hat).

The good thing is it's really easy to prototype algorithms, especially when
they can be naturally expressed in array notation.  The notation makes it
very easy to manipulate 2D arrays.  The bad thing is the notation doesn't
scale well; manipulating 3D or ND arrays was impossible until Matlab 5, and
is still really clunky.  Also, the language syntax is very inconsistent,
with some functions written with parens and others without.  This causes a
lot of annoyances.  So: I like Matlab as an exploratory environment for
numerics and for producing nice figures.  The Matlab language, frankly, is
not its strong suit.  There is room for a much nicer language in that
design space.

Mike



> From: "George" <gpoonen@mathworks.com>
> Date: Mon, 10 Dec 2001 10:43:06 -0500
> 
> Another language that we have not talked about is MATLAB. It is very popular
> in engineering depts. and with engineers. In engineering schools it is used
> by about 70% of the population. Somewhat similar to Python, although not as
> comprehensive for non-engineering applications.
> 
> I guess MATLAB would qualify as a light weight language with a very
> heavy-weight library, although the library has been partitioned for use in
> different disciplines, e.g. there is a toolbox for control systems, Signal
> processing, Image Processing etc.
> 
> I believe MATLAB has been successful for many reasons - some of them are
> mentioned below:
> 
> Focused on the needs of a particular community of users- engineers
> -	had initially focused on automotive engineers
> It is significantly easier to develop applications in MATLAB than in what
> engineers were using, viz.  FORTRAN
> A reasonably good IDE
> Very large and  effective library of functions
> Uses Matrices as a fundamental data structure and provides a concise and
> easily understood  notation to manipulate them - particularly valuable for
> engineers who are taught a similar notation to model engineering problems.
> While substantial effort was not put into optimizing the byte code
> generated, the use of Matrices and aggregate operations and implementing
> them as calls to C functions has been very effective. "For loops" that are
> vectorized operate 10-50 times faster. A lot of attention was paid to
> getting the libraries to be fast and numerically accurate. Most of the time
> is spent there.
> In many situations, being 20 or even 100% faster has no impact. There are
> other situations   where every nano-sec counts - one would not use MATLAB
> for those situations.