# HG changeset patch # User John W. Eaton # Date 1452271101 18000 # Node ID 8190fe6dc3fd116efbb12bc53554e52b7614934f # Parent 43b498b8c38cee239fce988ea67bf31f36e1d5ad * data.cc (Fcumsum, Fcumprod): Provide example in docstring. diff -r 43b498b8c38c -r 8190fe6dc3fd libinterp/corefcn/data.cc --- a/libinterp/corefcn/data.cc Thu Jan 07 20:56:34 2016 +0100 +++ b/libinterp/corefcn/data.cc Fri Jan 08 11:38:21 2016 -0500 @@ -1157,6 +1157,17 @@ Cumulative product of elements along dimension @var{dim}.\n\ \n\ If @var{dim} is omitted, it defaults to the first non-singleton dimension.\n\ +For example:\n\ +\n\ +@example\n\ +@group\n\ +cumsum ([1, 2; 3, 4; 5, 6])\n\ + @result{} 1 2\n\ + 3 8\n\ + 15 48\n\ +@end group\n\ +@end example\n\ +@end example\n\ @seealso{prod, cumsum}\n\ @end deftypefn") { @@ -1193,6 +1204,17 @@ Cumulative sum of elements along dimension @var{dim}.\n\ \n\ If @var{dim} is omitted, it defaults to the first non-singleton dimension.\n\ +For example:\n\ +\n\ +@example\n\ +@group\n\ +cumsum ([1, 2; 3, 4; 5, 6])\n\ + @result{} 1 2\n\ + 4 6\n\ + 9 12\n\ +@end group\n\ +@end example\n\ +@end example\n\ \n\ See @code{sum} for an explanation of the optional parameters\n\ @qcode{\"native\"}, @qcode{\"double\"}, and @qcode{\"extra\"}.\n\