help-octave
[Top][All Lists]
Advanced

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

Re: origin of the index syntax


From: John W. Eaton
Subject: Re: origin of the index syntax
Date: Fri, 22 Jul 2005 10:27:56 -0400

On 22-Jul-2005, Francesco Potorti` wrote:

| >It is known as 'colon notation' and is described and discussed in Golub
| >and Van Loan, Matrix Computations, 3rd Edition, ISBN = 0-8018-5414-8,
| >The Johns Hopkins University Press, 1996
| 
| Thank you for the reference, which is indeed useful.  Fortran 90, as
| already pointed out, has a similar notation.  However, Octave uses a
| more powerful syntax for index expressions, where a costant index can be
| any of
| - a number            (simple notation)
| - a colon expression  (colon notation)
| - a vector            (Matlab notation?)
| 
| As far as I can tell, this was invented by Matlab.  Is that true?

Perhaps it (or some variation) was used in APL?  I don't know APL so
I'm not sure.  The orignal Matlab was written in Fortran between 1977
and 1984.  Early Matlab was a little different from the current
language.  For example, it used <...> instead of [...] to delimit
matrices, and <> in a logical expression was the "not equal" operator
(see the origins of context-specific hacks arise before your very
eyes).  In any case, it appears that the final version of "classic
Matlab" had the colon notation for selecting rows and columns, but I
don't know when it might have been added, or what influenced this
choice of notation.  BTW, since this is more of a question about the
history and development of Matlab, and it seems that no one here
really knows the answer (or if they do, they have not come forward
yet), it might be better to ask in another forum.

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]