# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1312559923 18000 # Node ID 67a5acac8e1b0fe4b4065bcd58fcaf4136c943a2 # Parent b7e526ce7a3ac116102f7df1a9935188abd20e11 Clarify what indices can be for numel diff --git a/src/data.cc b/src/data.cc --- a/src/data.cc +++ b/src/data.cc @@ -2057,6 +2057,16 @@ @var{a}(@var{idx1}, @var{idx2}, @dots{})\n\ @end example\n\ \n\ +Note that the indices do not have to be numerical. For example\n\ +\n\ +@example\n\ + @var{a} = 1;\n\ + @var{b} = ones (2, 3);\n\ + numel (@var{a}, @var{b});\n\ +@end example\n\ +\n\ +will return 6, as this is the number of ways to index with @var{b}.\n\ +\n\ This method is also called when an object appears as lvalue with cs-list\n\ indexing, i.e., @code{object@{@dots{}@}} or @code{object(@dots{}).field}.\n\ @seealso{size}\n\