changeset 20607:db3286201347 stable

doc: Add explanation of ':' optional input to numel(). * (Fnumel): Add explanation of ':' optional input.
author Rik <>
date Wed, 07 Oct 2015 14:52:01 -0700
parents 1b62fc4e1b2f
children 45759620a9a5
files libinterp/corefcn/
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/	Wed Oct 07 14:41:39 2015 -0700
+++ b/libinterp/corefcn/	Wed Oct 07 14:52:01 2015 -0700
@@ -2714,7 +2714,7 @@
 @var{a}(@var{idx1}, @var{idx2}, @dots{})\n\
 @end example\n\
-Note that the indices do not have to be numerical.  For example,\n\
+Note that the indices do not have to be scalar numbers.  For example,\n\
@@ -2726,6 +2726,18 @@
 will return 6, as this is the number of ways to index with @var{b}.\n\
+Or the index could be the string @qcode{\":\"} which represents the colon\n\
+operator.  For example,\n\
+@var{a} = ones (5, 3);\n\
+numel (@var{a}, 2, \":\")\n\
+@end group\n\
+@end example\n\
+will return 3 as the second row has three column entries.\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\