Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: 'Open' languages: e.g., MATLAB
Replies: 107   Last Post: Jul 20, 1996 3:31 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Henry Baker

Posts: 243
Registered: 12/6/04
'Open' languages: e.g., MATLAB
Posted: Jun 29, 1996 12:20 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I've recently had occasion to use 'MATLAB' (tm The Math Works, Inc.), which
is a little language that gives access to some linear algebra and other
numerical analysis routines. Apparently, it is used in undergraduate
university courses in linear algebra, numerical analysis, linear systems
theory and signal processing, and perhaps some statistical analysis courses.

Although the MATLAB language leaves a _lot_ to be desired in terms of its
elegance and clarity -- especially when compared with some of its
competitors -- e.g., APL -- it does have some interesting features which
make it easier to use.

(I haven't studied the MATLAB language thoroughly, nor do I know any of
the details of how it is implemented, so some of the items below are
educated guessing on my part.)

1. There seems to be a 1-1 relationship between functions and files. While
this leads to extremely small files, it also allows for the file system itself
to be part of the language 'name space'. Apparently, when MATLAB is started
up, it searches the appropriate directories and _automagically_ builds the
appropriate 'autoload' capabilities, so that when a function is referenced,
it knows where to find it.

For those who have had to keep 'autoload' properties in Lisp systems
consistent with the locations of files, this greatly reduces that work.

This function=file relationship gives MATLAB more of a feeling of a
Unix 'shell' language, because the programmer does not have to go to any
trouble keeping the file system and the internal name space consistent.

MATLAB itself seems to go to a lot of trouble to keep the file & the function
consistent. Although MATLAB provides its own function editor, one is
also allowed to use another editor -- e.g., Emacs -- and MATLAB apparently
notices when one of its files gets updated.

2. MATLAB provides a 'named' scheme for multiple returned values. If a
function produces multiple values -- e.g., the singular value decomposition
for matrices, which produces U, S, V, where U,V are unitary/orthogonal
matrices, and S is a diagonal matrix -- then one defines the function like so:

function [U,S,V] = svd(M)

and then references U,S,V by name within the function. This is almost
a return to the yesteryear of Fortran 1, where one assigned the function
name itself with a value to be returned.

Those in the prolog/logic community will find this old hat. Those from
the Pascal/Ada community will probably be confused, since it appears
that the returned values are all constructed within the function and
passed out; these apparently are _not_ 'var'/'inout' parameters.

I'm not sure how this is implemented in MATLAB. In particular, I'm not
completely sure what happens when a multi-valued function is used
'functionally' -- I think that perhaps only the first value is then used.

(This is one of the big problems with MATLAB -- the documentation is
woefully inadequate at explaining the intricacies of name binding,
semantics of parameter passing and value returning, etc. For a language
that is aimed somewhat at _mathematicians_, such ambiguities and sloppiness
are unforgiveable.)

3. MATLAB does go to substantial effort to try to get the 'right'
semantics for 'NaN's' ("Not-a-Numbers"). It may be the first language
since the Lisp Machines that really put in an effort to do this right.

4. MATLAB shows that if the underlying subroutines are high quality, people
will put up with a lot of inelegancies in the 'scripting' language. Some
would say that the graphing/plotting capabilities alone are worth the price of
admission.

-------

On the negative side, MATLAB's integration with the Maple symbolic
algebra package is a bad joke. Although the Maple system itself is actually
quite good, one would have a difficult time coming to that conclusion after
trying to use Maple within MATLAB. Apparently, the only communication
between MATLAB and Maple is in the form of character strings, so there's
a _lot_ of parsing and unparsing going on!

Also, Maple uses an entirely different set of names for operations than
does MATLAB -- e.g., MATLAB uses the single quote "'" for the transpose
(conjugated), while Maple uses the 'transpose()' function.

MATLAB understands complex numbers very well, but Maple (at least as
incorporated into MATLAB) doesn't seem to understand complex numbers
at all.

--------

In summary, MATLAB is a useful tool because of its high quality library of
built-in functions and graphing/plotting capabilities, and because it allows
a relatively simple programming model which hides many of the
problems of the internal v. file-system issues.

It is a shame, however, that 'scripting languages' like MATLAB didn't
learn a bit more from languages like APL in the areas of generalized
arrays and array-indexing, and from languages like Lisp/etc. in the
areas of data structures more sophisticated than arrays for symbolic
algebra.

I'm somewhat concerned that non-CS undergraduate students will come to
the conclusion that MATLAB is 'state of the art' in terms of computer
language design, and that misconception would be a real shame. Perhaps the
company could at least include a disclaimer regarding the MATLAB/Maple
interface, and tell the students that they realize that it is kludgey, and
that they will attempt to improve this in the future.

--
www/ftp directory:
ftp://ftp.netcom.com/pub/hb/hbaker/home.html




Date Subject Author
6/29/96
Read 'Open' languages: e.g., MATLAB
Henry Baker
6/30/96
Read Re: 'Open' languages: e.g., MATLAB
Janet Bell
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Todd Spindler
6/30/96
Read Re: 'Open' languages: e.g., MATLAB
Mikael Djurfeldt
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Jakob Engblom
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Tom L. Davis
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Ralph Becket
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Ralph Becket
7/7/96
Read Re: 'Open' languages: e.g., MATLAB
Tom L. Davis
7/8/96
Read Re: 'Open' languages: e.g., MATLAB
Jakob Engblom
7/8/96
Read Re: 'Open' languages: e.g., MATLAB
Ralph Becket
7/10/96
Read Re: 'Open' languages: e.g., MATLAB
Matt Kennel
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Mike Gertz
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Jakob Engblom
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Bruce Stephens
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Bjørn Remseth
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
rbl@po.cwru.edu
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Jason Voigt
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Graham Matthews
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Tom L. Davis
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Bruce Stephens
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Alexey Goldin
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Richard J. Fateman
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Graham Matthews
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Raymond Toy
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Alexey Goldin
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Thorsten Ohl
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Graham Matthews
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Graham Matthews
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Matt Kennel
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Graham Matthews
7/3/96
Read Re: 'Open' languages: e.g., MATLAB
Jakob Engblom
7/4/96
Read Re: 'Open' languages: e.g., MATLAB
Richard A. O'Keefe
7/3/96
Read Re: 'Open' languages: e.g., MATLAB
Thant Tessman
7/1/96
Read Re: 'Open' languages: e.g., MATLAB
Bryan O'Sullivan
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
--
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Graham Matthews
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
--
7/8/96
Read Re: Bracket overuse
Mitchell Wand
7/9/96
Read Re: Bracket overuse
Philip Santas
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Bruce Stephens
7/5/96
Read Re: 'Open' languages: e.g., MATLAB
Henry Baker
7/7/96
Read Re: 'Open' languages: e.g., MATLAB
Tom L. Davis
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Marco Antoniotti
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Jordan Pollack
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Dave
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Raj P Manandhar
7/3/96
Read Re: 'Open' languages: e.g., MATLAB
Bill Simpson
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Graham Matthews
7/4/96
Read Re: Bracket overuse
Marco Antoniotti
7/2/96
Read Re: 'Open' languages: e.g., MATLAB
Perry A. Stoll
7/3/96
Read Re: 'Open' languages: e.g., MATLAB
Bruce Stephens
7/3/96
Read Re: Bracket overuse
Carlos A. Felippa
7/3/96
Read Re: Bracket overuse
James Lawry
7/3/96
Read Re: Bracket overuse
Carlos A. Felippa
7/6/96
Read Re: Bracket overuse
Jason Harris
7/6/96
Read Re: Bracket overuse
Richard J. Fateman
7/7/96
Read Re: Bracket overuse
Jason Harris
7/7/96
Read Re: Bracket overuse
Carlos A. Felippa
7/8/96
Read Re: Bracket overuse
Matthew McDonald
7/8/96
Read Re: Bracket overuse
Richard J. Fateman
7/9/96
Read Re: Bracket overuse
Matthew McDonald
7/14/96
Read Re: Bracket overuse
Carlos A. Felippa
7/14/96
Read Re: Bracket overuse
Jim Michael
7/16/96
Read Re: Bracket overuse
Marco Antoniotti
7/7/96
Read Re: Bracket overuse
Jason Harris
7/8/96
Read Re: Bracket overuse
Jason Harris
7/9/96
Read Re: Bracket overuse
Mitchell Wand
7/7/96
Read Re: Bracket overuse
Carlos A. Felippa
7/15/96
Read Re: Bracket overuse
Marco Antoniotti
7/16/96
Read Re: Bracket overuse
Carlos A. Felippa
7/18/96
Read Re: Bracket overuse
David Doolin
7/3/96
Read Re: 'Open' languages: e.g., MATLAB
Darius Blasband
7/3/96
Read Re: 'Open' languages: e.g., MATLAB
Graham C. Hughes
7/3/96
Read Re: 'Open' languages: e.g., MATLAB
Cleve Moler
7/6/96
Read Re: 'Open' languages: e.g., MATLAB
Matt Kennel
7/8/96
Read Re: 'Open' languages: e.g., MATLAB
Joe Deasy
7/10/96
Read Re: 'Open' languages: e.g., MATLAB and Macsyma
Richard J. Petti
7/10/96
Read Re: 'Open' languages: e.g., MATLAB
Tom L. Davis
7/4/96
Read Re: 'Open' languages: e.g., MATLAB
Richard J. Fateman
7/4/96
Read Re: 'Open' languages: e.g., MATLAB
Graham Matthews
7/5/96
Read Re: 'Open' languages: e.g., MATLAB
Keith Wildermuth
7/5/96
Read Re: 'Open' languages: e.g., MATLAB
Matt Kennel
7/3/96
Read Re: 'Open' languages: e.g., MATLAB
Graham Matthews
7/4/96
Read Re: 'Open' languages: e.g., MATLAB
Bruce Stephens
7/4/96
Read Re: 'Open' languages: e.g., MATLAB
Graham Matthews
7/5/96
Read Re: 'Open' languages: e.g., MATLAB
--
7/5/96
Read Re: 'Open' languages: e.g., MATLAB
Jakob Engblom
7/5/96
Read Re: 'Open' languages: e.g., MATLAB
Carlos A. Felippa
7/5/96
Read Re: 'Open' languages: e.g., MATLAB
Richard J. Fateman
7/5/96
Read Re: 'Open' languages: e.g., MATLAB
Sebastian Erich Good
7/7/96
Read Re: 'Open' languages: e.g., MATLAB
Cyber Surfer
7/7/96
Read Re: 'Open' languages: e.g., MATLAB
James Lawry
7/7/96
Read Re: 'Open' languages: e.g., MATLAB
Sebastian Erich Good
7/5/96
Read Re: 'Open' languages: e.g., MATLAB
Jakob Engblom
7/8/96
Read Re: 'Open' languages: e.g., MATLAB
Max Anger
7/9/96
Read Re: 'Open' languages: e.g., MATLAB
Richard A. O'Keefe
7/10/96
Read Re: 'Open' languages: e.g., MATLAB
Max Anger
7/9/96
Read Re: 'Open' languages: e.g., MATLAB
Cyber Surfer
7/16/96
Read Re: 'Open' languages: e.g., MATLAB
Robert Munyer
7/18/96
Read Re: 'Open' languages: e.g., MATLAB
Max Anger
7/20/96
Read Re: 'Open' languages: e.g., MATLAB
Darius Blasband
7/8/96
Read Re: 'Open' languages: e.g., MATLAB
Graham Matthews
7/8/96
Read Re: 'Open' languages: e.g., MATLAB
Christopher C Stacy
7/9/96
Read Re: 'Open' languages: e.g., MATLAB
Jakob Engblom
7/11/96
Read Re: 'Open' languages: e.g., MATLAB
Dave Love
7/11/96
Read Re: 'Open' languages: e.g., MATLAB
William Clodius
7/20/96
Read Re: 'Open' languages: e.g., MATLAB
Bryan O'Sullivan

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.