Mercurial > octave-nkf
comparison scripts/general/accumdim.m @ 14119:94e2a76f1e5a stable
doc: Final grammarcheck and spellcheck before 3.6.0 release.
* container.txi, aspell-octave.en.pws, expr.txi, vectorize.txi, accumarray.m,
accumdim.m, interpft.m, strread.m, parseparams.m, warning_ids.m, cellfun.cc,
help.cc: grammarcheck and spellcheck docstrings.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Thu, 29 Dec 2011 06:05:00 -0800 |
parents | 951eacaf9381 |
children | 72c96de7a403 |
comparison
equal
deleted
inserted
replaced
14118:ebe2e6b2ba52 | 14119:94e2a76f1e5a |
---|---|
20 ## @deftypefn {Function File} {} accumdim (@var{subs}, @var{vals}, @var{dim}, @var{n}, @var{func}, @var{fillval}) | 20 ## @deftypefn {Function File} {} accumdim (@var{subs}, @var{vals}, @var{dim}, @var{n}, @var{func}, @var{fillval}) |
21 ## Create an array by accumulating the slices of an array into the | 21 ## Create an array by accumulating the slices of an array into the |
22 ## positions defined by their subscripts along a specified dimension. | 22 ## positions defined by their subscripts along a specified dimension. |
23 ## The subscripts are defined by the index vector @var{subs}. | 23 ## The subscripts are defined by the index vector @var{subs}. |
24 ## The dimension is specified by @var{dim}. If not given, it defaults | 24 ## The dimension is specified by @var{dim}. If not given, it defaults |
25 ## to the first non-singleton dimension. The length of @var{subs} must | 25 ## to the first non-singleton dimension. The length of @var{subs} must |
26 ## be equal to @code{size (@var{vals}, @var{dim})}. | 26 ## be equal to @code{size (@var{vals}, @var{dim})}. |
27 ## | 27 ## |
28 ## The extent of the result matrix in the working dimension will be | 28 ## The extent of the result matrix in the working dimension will be |
29 ## determined by the subscripts themselves. However, if @var{n} is | 29 ## determined by the subscripts themselves. However, if @var{n} is |
30 ## defined it determines this extent. | 30 ## defined it determines this extent. |
31 ## | 31 ## |
32 ## The default action of @code{accumdim} is to sum the subarrays with the | 32 ## The default action of @code{accumdim} is to sum the subarrays with the |
33 ## same subscripts. This behavior can be modified by defining the | 33 ## same subscripts. This behavior can be modified by defining the |
34 ## @var{func} function. This should be a function or function handle | 34 ## @var{func} function. This should be a function or function handle |
37 ## @code{max} functions can be used directly, and @code{accumdim} | 37 ## @code{max} functions can be used directly, and @code{accumdim} |
38 ## accounts for the middle empty argument that is used in their calling. | 38 ## accounts for the middle empty argument that is used in their calling. |
39 ## | 39 ## |
40 ## The slices of the returned array that have no subscripts associated | 40 ## The slices of the returned array that have no subscripts associated |
41 ## with them are set to zero. Defining @var{fillval} to some other | 41 ## with them are set to zero. Defining @var{fillval} to some other |
42 ## value allows these values to be defined. | 42 ## value allows these values to be defined. |
43 ## | 43 ## |
44 ## An example of the use of @code{accumdim} is: | 44 ## An example of the use of @code{accumdim} is: |
45 ## | 45 ## |
46 ## @example | 46 ## @example |
47 ## @group | 47 ## @group |