changeset 20433:fc23fbe05f3a stable

doc: Clarify behavior of length() function (bug #45611). * data.cc (Flength): Clarify behavior of length() function.
author Rik <rik@octave.org>
date Sat, 25 Jul 2015 20:16:58 -0700
parents a8cc8318da8c
children 5b7d7051a032
files libinterp/corefcn/data.cc
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/data.cc	Sat Jul 25 22:17:57 2015 +0200
+++ b/libinterp/corefcn/data.cc	Sat Jul 25 20:16:58 2015 -0700
@@ -2659,9 +2659,9 @@
 Return the length of the object @var{a}.\n\
 \n\
 The length is 0 for empty objects, 1 for scalars, and the number of elements\n\
-for vectors.  For matrix objects, the length is the number of rows or\n\
-columns, whichever is greater (this odd definition is used for compatibility\n\
-with @sc{matlab}).\n\
+for vectors.  For matrix or N-dimensional objects, the length is the number\n\
+of elements along the largest dimension\n\
+(equivalent to @w{@code{max (size (@var{a}))}}).\n\
 @seealso{numel, size}\n\
 @end deftypefn")
 {