From help-octave-request at bevo dot che dot wisc dot edu Thu Dec 14 11:37:46 2000 Subject: Question about size() and length() of lists (newbie question) From: "John W. Eaton" To: Douglas Eck Cc: "help-octave at bevo dot che dot wisc dot edu" Date: Thu, 14 Dec 2000 11:37:37 -0600 On 14-Dec-2000, Douglas Eck 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 -------------------------------------------------------------