Mercurial > hg > octave-nkf
changeset 12924:67a5acac8e1b stable
Clarify what indices can be for numel
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Fri, 05 Aug 2011 10:58:43 -0500 |
parents | b7e526ce7a3a |
children | f9c1f7c1ead0 |
files | src/data.cc |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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\