help-octave
[Top][All Lists]
Advanced

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

## Question about size() and length() of lists (newbie question)

 From: John W. Eaton Subject: Question about size() and length() of lists (newbie question) Date: Thu, 14 Dec 2000 11:37:37 -0600

```On 14-Dec-2000, Douglas Eck <address@hidden> wrote:

| I noticed that size() and length() treat lists
| differently.  I can imagine that this is
| desired behavior but I thought I'd ask.
|
| Octave >> version
| ans = 2.1.31
| Octave >> l=list('a','b','c')
| l =
| (
|   [1] = a
|   [2] = b
|   [3] = c
| )
| Octave >> length(l)
| ans = 3
| Octave >> size(l)
| ans =
|
|         -1        -1

Length seems a natural way to ask for the length of a list, which
doesn't have an orientation (it is not a row or column vector), and as
currently implemented, cannot be two dimensional.

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]